/* 
* jqGrid  5.8.2-Trial  
* Copyright (c) 2008, Tony Tomov, tony@trirand.com 
*  License: http://guriddo.net/?page_id=103334 
*
* Modules: grid.base.js; grid.celledit.js; grid.common.js; grid.filter.js; grid.formedit.js; grid.grouping.js; grid.import.js; grid.inlinedit.js; grid.jqueryui.js; grid.pivot.js; grid.subgrid.js; grid.treegrid.js; jqDnR.js; jqModal.js; jquery.fmatter.js; jquery.sortable.js; grid.utils.js; grid.export.js; grid.aria.js; grid.transposed.js; grid.frozenrows.js;
*/
!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery"],e):e(jQuery)}(function(Ye){"use strict";Ye.jgrid=Ye.jgrid||{},Ye.jgrid.hasOwnProperty("defaults")||(Ye.jgrid.defaults={}),Ye.extend(Ye.jgrid,{version:"5.8.2",isNull:function(e,t){return t&&!0===t?null===e:null==e},trim:function(e){return"string"==typeof
e?e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""):e},isFunction:function(e){return"function"==typeof
e},type:function(e,t){return t?null===e?"[object Null]":Object.prototype.toString.call(e):null==e?(e+"").toLowerCase():"generatorfunction"===(t=Object.prototype.toString.call(e).slice(8,-1).toLowerCase())?"function":t.match(/^(array|bigint|date|error|function|generator|regexp|symbol)$/)?t:"object"==typeof
e||"function"==typeof
e?"object":typeof
e},floatNum:function(e,t){return void
0===t&&(t=0),e=parseFloat(e),isNaN(e)?t:e},htmlDecode:function(e){return e&&("&nbsp;"===e||"&#160;"===e||1===e.length&&160===e.charCodeAt(0))?"":e&&String(e).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&amp;/g,"&")},htmlEncode:function(e){return e&&String(e).replace(/&/g,"&amp;").replace(/\"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},template:function(e){var
o,n=Ye.makeArray(arguments).slice(1),a=n.length;return(e=Ye.jgrid.isNull(e)?"":e).replace(/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,function(e,t){if(!isNaN(parseInt(t,10)))return n[parseInt(t,10)];for(o=0;o<a;o++)if(Array.isArray(n[o]))for(var
i=n[o],r=i.length;r--;)if(t===i[r].nm)return i[r].v})},msie:function(){return 0<Ye.jgrid.msiever()},msiever:function(){var
e=0,t=window.navigator.userAgent,i=t.indexOf("MSIE");return 0<i?e=parseInt(t.substring(i+5,t.indexOf(".",i))):navigator.userAgent.match(/Trident\/7\./)&&(e=11),e},getCellIndex:function(e){e=Ye(e);return e.is("tr")?-1:(e=(e.is("td")||e.is("th")?e:e.closest("td,th"))[0],Ye.jgrid.msie()?Ye.inArray(e,e.parentNode.cells):e.cellIndex)},stripHtml:function(e){return(e=String(e))&&((e=e.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi,""))&&"&nbsp;"!==e&&"&#160;"!==e?e.replace(/\"/g,"'"):"")},stripPref:function(e,t){var
i=Ye.jgrid.type(e);return t="string"!==i&&"number"!==i?t:""!==(e=String(e))?String(t).replace(String(e),""):t},stripScript:function(e){return e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi," ")},useJSON:!0,runCode:function(e){return Function('"use strict";return ('+e+")")()},parse:function(e){e=(e="/*"===(e="while(1);"===(e=e).substr(0,9)?e.substr(9):e).substr(0,2)?e.substr(2,e.length-4):e)||"{}";return!0===Ye.jgrid.useJSON&&"object"==typeof
JSON&&"function"==typeof
JSON.parse?JSON.parse(e):Ye.jgrid.runCode(e)},dateToOADate:function(e){var
t=new
Date(e);return Math.round((t.setHours(0,0,0,0)-new
Date(1899,11,30))/864e5)+(Math.abs((e-t)%864e5)/864e5).toFixed(10).substr(1)},parseDate:function(e,t,i,r){function
o(e,t){for(e=String(e),t=parseInt(t,10)||2;e.length<t;)e="0"+e;return e}function
n(e,t){return 0===e?12===t&&(t=0):12!==t&&(t+=12),t}var
a,s,l,d=new
RegExp("^/Date\\((([-+])?[0-9]+)(([-+])([0-9]{2})([0-9]{2}))?\\)/$"),d="string"==typeof
t?t.match(d):null,c={m:1,d:1,y:1970,h:0,i:0,s:0,u:0},p=0,u=0;if(void
0===(r=void
0===(r=void
0===r?Ye.jgrid.getRegional(this,"formatter.date"):r)?{}:r).parseRe&&(r.parseRe=/[#%\\\/:_;.,\t\s-]/),void
0===r.AmPm&&(r.AmPm=["am","pm","AM","PM"]),r.masks&&r.masks.hasOwnProperty(e)&&(e=r.masks[e]),t&&!Ye.jgrid.isNull(t))if(isNaN(+t)||"u"!==String(e).toLowerCase())if(t.constructor===Date)p=t,r.validate=!1;else
if(null!==d)p=new
Date(parseInt(d[1],10)),d[3]&&(u=60*Number(d[5])+Number(d[6]),u=(u*="-"===d[4]?1:-1)-p.getTimezoneOffset(),p.setTime(Number(Number(p)+60*u*1e3))),r.validate=!1;else{for("ISO8601Long"===r.srcformat&&"Z"===t.charAt(t.length-1)&&(u-=(new
Date).getTimezoneOffset()),t=String(t).replace(/\T/g,"#").replace(/\t/,"%").split(r.parseRe),s=0,l=(e=e.replace(/\T/g,"#").replace(/\t/,"%").split(r.parseRe)).length;s<l;s++){switch(e[s]){case"M":-1!==(a=Ye.inArray(t[s],r.monthNames))&&a<12&&(t[s]=a+1,c.m=t[s]);break;case"F":-1!==(a=Ye.inArray(t[s],r.monthNames,12))&&11<a&&(t[s]=a+1-12,c.m=t[s]);break;case"n":e[s]="m";break;case"j":e[s]="d";break;case"a":-1!==(a=Ye.inArray(t[s],r.AmPm))&&a<2&&t[s]===r.AmPm[a]&&(t[s]=a,c.h=n(t[s],c.h));break;case"A":-1!==(a=Ye.inArray(t[s],r.AmPm))&&1<a&&t[s]===r.AmPm[a]&&(t[s]=a-2,c.h=n(t[s],c.h));break;case"g":c.h=parseInt(t[s],10)}void
0!==t[s]&&(c[e[s].toLowerCase()]=parseInt(t[s],10))}if(c.f&&(c.m=c.f),0===c.m&&0===c.y&&0===c.d)return"&#160;";c.m=parseInt(c.m,10)-1;d=c.y;70<=d&&d<=99?c.y=1900+c.y:0<=d&&d<=69&&(c.y=2e3+c.y),p=new
Date(c.y,c.m,c.d,c.h,c.i,c.s,c.u),0!==u&&p.setTime(Number(Number(p)+60*u*1e3))}else
p=new
Date(1e3*parseFloat(t)),r.validate=!1;else
p=new
Date(c.y,c.m,c.d,c.h,c.i,c.s,c.u);if(r&&!0===r.validate)return d=new
Date(c.y,+c.m,c.d,c.h,c.i),Boolean(+d)&&d.getDate()===c.d&&d.getHours()===c.h&&d.getMinutes()===c.i;if(r.userLocalTime&&0===u&&0!==(u-=(new
Date).getTimezoneOffset())&&p.setTime(Number(Number(p)+60*u*1e3)),void
0===i)return p;i=r.masks&&r.masks.hasOwnProperty(i)?r.masks[i]:i||"Y-m-d";var
d=p.getHours(),u=p.getMinutes(),g=p.getDate(),h=p.getMonth()+1,f=p.getTimezoneOffset(),m=p.getSeconds(),v=p.getMilliseconds(),b=p.getDay(),w=p.getFullYear(),j=(b+6)%7+1,_=(new
Date(w,h-1,g)-new
Date(w,0,1))/864e5,y={d:o(g),D:r.dayNames[b],j:g,l:r.dayNames[b+7],N:j,S:r.S(g),w:b,z:_,W:j<5?Math.floor((_+j-1)/7)+1:Math.floor((_+j-1)/7)||((new
Date(w-1,0,1).getDay()+6)%7<4?53:52),F:r.monthNames[h-1+12],m:o(h),M:r.monthNames[h-1],n:h,t:"?",L:"?",o:"?",Y:w,y:String(w).substring(2),a:d<12?r.AmPm[0]:r.AmPm[1],A:d<12?r.AmPm[2]:r.AmPm[3],B:"?",g:d%12||12,G:d,h:o(d%12||12),H:o(d),i:o(u),s:o(m),u:v,e:"?",I:"?",O:(0<f?"-":"+")+o(100*Math.floor(Math.abs(f)/60)+Math.abs(f)%60,4),P:(0<f?"-":"+")+(g=o(100*Math.floor(Math.abs(f)/60)+Math.abs(f)%60,4),b=-2,_=":",(g=String(g)).slice(0,b)+_+g.slice(b)),T:(String(p).match(/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g)||[""]).pop().replace(/[^-+\dA-Z]/g,""),Z:"?",c:"?",r:"?",U:Math.floor(p/1e3)};return i.replace(/\\.|[dDjlNSwzWFmMntLoYyaABgGhHisueIOPTZcrU]/g,function(e){return y.hasOwnProperty(e)?y[e]:e.substring(1)})},jqID:function(e){return String(e).replace(/[!"#$%&'()*+,.\/:; <=>?@\[\\\]\^`{|}~]/g,"\\$&")},guid:1,uidPref:"jqg",randId:function(e){return(e||Ye.jgrid.uidPref)+Ye.jgrid.guid++},getAccessor:function(e,t){var
i,r,o=[];if("function"==typeof
t)return t(e);if(void
0===(i=e[t]))try{if(r=(o="string"==typeof
t?t.split("."):o).length)for(i=e;i&&r--;)i=i[o.shift()]}catch(e){}return i},getXmlData:function(e,t,i){var
r="string"==typeof
t?t.match(/^(.*)\[(\w+)\]$/):null;return"function"==typeof
t?t(e):r&&r[2]?(r[1]?Ye(r[1],e):Ye(e)).attr(r[2]):(r=Ye(t,e),i?r:0<r.length?Ye(r).text():void
0)},cellWidth:function(){var
e=Ye("<div class='ui-jqgrid' style='left:10000px'><table class='ui-jqgrid-btable ui-common-table' style='width:5px;'><tr class='jqgrow'><td style='width:5px;display:block;'></td></tr></table></div>"),t=e.appendTo("body").find("td").width();return e.remove(),.1<Math.abs(t-5)},isLocalStorage:function(){try{return"localStorage"in
window&&null!==window.localStorage}catch(e){return!1}},getRegional:function(e,t,i){var
r;return void
0!==i?i:void
0===(r=e.p&&e.p.regional&&Ye.jgrid.regional?Ye.jgrid.getAccessor(Ye.jgrid.regional[e.p.regional]||{},t):r)?Ye.jgrid.getAccessor(Ye.jgrid,t):r},isMobile:function(){try{return/Android|webOS|iPhone|iPad|iPod|pocket|psp|kindle|avantgo|blazer|midori|Tablet|Palm|maemo|plucker|phone|BlackBerry|symbian|IEMobile|mobile|ZuneWP7|Windows Phone|Opera Mini/i.test(navigator.userAgent)?!0:!1}catch(e){return!1}},cell_width:!0,scrollbarWidth:function(){var
e=Ye('<div style="width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div>'),t=(Ye("body").append(e),Ye("div",e).innerWidth()),i=(e.css("overflow-y","scroll"),Ye("div",e).innerWidth());return Ye(e).remove(),t-i<0?18:t-i},ajaxOptions:{},from:function(e){var
v=this;return new
function(e,t){"string"==typeof
e&&(e=Ye.data(e));var
h=this,o=e,f=!0,r=!1,i=t,m=/[\$,%]/g,n=null,a=null,s=0,l=!1,d="",u=[],c=!0;if("object"==typeof
e&&e.push)return 0<e.length&&(c="object"==typeof
e[0]),this._hasData=function(){return null!==o&&0!==o.length},this._getStr=function(e){var
t=[];return r&&t.push("jQuery.trim("),t.push("String("+e+")"),r&&t.push(")"),f||t.push(".toLowerCase()"),t.join("")},this._strComp=function(e){return"string"==typeof
e?".toString()":""},this._group=function(e,t){return{field:e.toString(),unique:t,items:[]}},this._toStr=function(e){return e=(e=r?Ye.jgrid.trim(e):e).toString().replace(/\\/g,"\\\\").replace(/\"/g,'\\"'),f?e:e.toLowerCase()},this._funcLoop=function(i){var
r=[];return Ye.each(o,function(e,t){r.push(i(t))}),r},this._append=function(e){var
t;for(null===i?i="":i+=""===d?" && ":d,t=0;t<s;t++)i+="(";l&&(i+="!"),i+="("+e+")",l=!1,d="",s=0},this._setCommand=function(e,t){n=e,a=t},this._resetNegate=function(){l=!1},this._repeatCommand=function(e,t){return null===n?h:null!==e&&null!==t?n(e,t):null!==a&&c?n(a,e):n(e)},this._equals=function(e,t){return 0===h._compare(e,t,1)},this._compare=function(e,t,i){var
r=Object.prototype.toString;return void
0===i&&(i=1),void
0===t&&(t=null),null===(e=void
0===e?null:e)&&null===t?0:null===e&&null!==t?1:null!==e&&null===t?-1:"[object Date]"===r.call(e)&&"[object Date]"===r.call(t)||"number"==typeof
e&&"number"==typeof
t?t<e?i:e<t?-i:0:(r=String(e).localeCompare(String(t)))<0?-i:0<r?i:0},this._performSort=function(){0!==u.length&&(o=h._doSort(o,0))},this._doSort=function(e,t){var
i=u[t].by,r=u[t].dir,o=u[t].type,n=u[t].datefmt,a=u[t].sfunc;if(t===u.length-1)return h._getOrder(e,i,r,o,n,a);t++;for(var
s,l,d=h._getGroup(e,i,r,o,n),c=[],p=0;p<d.length;p++)for(l=h._doSort(d[p].items,t),s=0;s<l.length;s++)c.push(l[s]);return c},this._getOrder=function(e,i,t,r,o,n){for(var
a,s,l,d,c=[],p=[],u="a"===t?1:-1,g=(d="float"===(r=void
0===r?"text":r)||"number"===r||"currency"===r||"numeric"===r?function(e){e=parseFloat(String(e).replace(m,""));return isNaN(e)?Number.NEGATIVE_INFINITY:e}:"int"===r||"integer"===r?function(e){return e?parseFloat(String(e).replace(m,"")):Number.NEGATIVE_INFINITY}:"date"===r||"datetime"===r?function(e){return Ye.jgrid.parseDate.call(v,o,e).getTime()}:Ye.jgrid.isFunction(r)?r:function(e){return e=e?Ye.jgrid.trim(String(e)):"",f?e:e.toLowerCase()},Ye.each(e,function(e,t){s=""!==i?Ye.jgrid.getAccessor(t,i):t,s=d(s=void
0===s?"":s,t),p.push({vSort:s,index:e})}),Ye.jgrid.isFunction(n)?p.sort(function(e,t){return n.call(this,e.vSort,t.vSort,u,e,t)}):p.sort(function(e,t){return h._compare(e.vSort,t.vSort,u)}),l=0,e.length);l<g;)a=p[l].index,c.push(e[a]),l++;return c},this._getGroup=function(e,i,t,r,o){var
n,a=[],s=null,l=null;return Ye.each(h._getOrder(e,i,t,r,o),function(e,t){n=Ye.jgrid.getAccessor(t,i),Ye.jgrid.isNull(n)&&(n=""),h._equals(l,n)||(l=n,null!==s&&a.push(s),s=h._group(i,n)),s.items.push(t)}),null!==s&&a.push(s),a},this.ignoreCase=function(){return f=!1,h},this.useCase=function(){return f=!0,h},this.trim=function(){return r=!0,h},this.noTrim=function(){return r=!1,h},this.execute=function(){var
e=i,t=[];return null!==e&&(Ye.each(o,function(){Ye.jgrid.runCode.call(v,e.replace(/this/g,JSON.stringify(this)))&&t.push(this)}),o=t),h},this.data=function(){return o},this.select=function(i){var
r;return h._performSort(),h._hasData()?(h.execute(),Ye.jgrid.isFunction(i)?(r=[],Ye.each(o,function(e,t){r.push(i(t))}),r):o):[]},this.hasMatch=function(){return!!h._hasData()&&(h.execute(),0<o.length)},this.andNot=function(e,t,i){return l=!l,h.and(e,t,i)},this.orNot=function(e,t,i){return l=!l,h.or(e,t,i)},this.not=function(e,t,i){return h.andNot(e,t,i)},this.and=function(e,t,i){return d=" && ",void
0===e?h:h._repeatCommand(e,t,i)},this.or=function(e,t,i){return d=" || ",void
0===e?h:h._repeatCommand(e,t,i)},this.orBegin=function(){return s++,h},this.orEnd=function(){return null!==i&&(i+=")"),h},this.isNot=function(e){return l=!l,h.is(e)},this.is=function(e){return h._append("this."+e),h._resetNegate(),h},this._compareValues=function(e,t,i,r,o){var
n=c?"jQuery.jgrid.getAccessor(this,'"+t+"')":"this",a=i=void
0===i?null:i,s=void
0===o.stype?"text":o.stype;if(null!==i)switch(s){case"int":case"integer":n="parseInt("+n+",10)",a="parseInt("+(a=isNaN(Number(a))||""===a?Number.NEGATIVE_INFINITY:a)+",10)";break;case"float":case"number":case"numeric":a=String(a).replace(m,""),n="parseFloat("+n+")",a="parseFloat("+(a=isNaN(Number(a))||""===a?Number.NEGATIVE_INFINITY:Number(a))+")";break;case"date":case"datetime":a=String(Ye.jgrid.parseDate.call(v,o.srcfmt||"Y-m-d",a).getTime()),n='jQuery.jgrid.parseDate.call(jQuery("#'+Ye.jgrid.jqID(v.p.id)+'")[0],"'+o.srcfmt+'",'+n+").getTime()";break;default:n=h._getStr(n),a=h._getStr('"'+h._toStr(a)+'"')}return h._append(n+" "+r+" "+a),h._setCommand(e,t),h._resetNegate(),h},this.equals=function(e,t,i){return h._compareValues(h.equals,e,t,"==",i)},this.notEquals=function(e,t,i){return h._compareValues(h.equals,e,t,"!==",i)},this.isNull=function(e,t,i){return h._compareValues(h.equals,e,null,"===",i)},this.greater=function(e,t,i){return h._compareValues(h.greater,e,t,">",i)},this.less=function(e,t,i){return h._compareValues(h.less,e,t,"<",i)},this.greaterOrEquals=function(e,t,i){return h._compareValues(h.greaterOrEquals,e,t,">=",i)},this.lessOrEquals=function(e,t,i){return h._compareValues(h.lessOrEquals,e,t,"<=",i)},this.startsWith=function(e,t){var
i=Ye.jgrid.isNull(t)?e:t,i=(r?Ye.jgrid.trim(i.toString()):i.toString()).length;return c?h._append(h._getStr("jQuery.jgrid.getAccessor(this,'"+e+"')")+".substr(0,"+i+") == "+h._getStr('"'+h._toStr(t)+'"')):(Ye.jgrid.isNull(t)||(i=(r?Ye.jgrid.trim(t.toString()):t.toString()).length),h._append(h._getStr("this")+".substr(0,"+i+") == "+h._getStr('"'+h._toStr(e)+'"'))),h._setCommand(h.startsWith,e),h._resetNegate(),h},this.endsWith=function(e,t){var
i=Ye.jgrid.isNull(t)?e:t,i=(r?Ye.jgrid.trim(i.toString()):i.toString()).length;return c?h._append(h._getStr("jQuery.jgrid.getAccessor(this,'"+e+"')")+".substr("+h._getStr("jQuery.jgrid.getAccessor(this,'"+e+"')")+".length-"+i+","+i+') == "'+h._toStr(t)+'"'):h._append(h._getStr("this")+".substr("+h._getStr("this")+'.length-"'+h._toStr(e)+'".length,"'+h._toStr(e)+'".length) == "'+h._toStr(e)+'"'),h._setCommand(h.endsWith,e),h._resetNegate(),h},this.contains=function(e,t){return c?h._append(h._getStr("jQuery.jgrid.getAccessor(this,'"+e+"')")+'.indexOf("'+h._toStr(t)+'",0) > -1'):h._append(h._getStr("this")+'.indexOf("'+h._toStr(e)+'",0) > -1'),h._setCommand(h.contains,e),h._resetNegate(),h},this.user=function(e,t,i){var
r='$("#'+v.p.id+'")[0]';return h._append(r+".p.customFilterDef."+e+".action.call("+r+' ,{rowItem: this, searchName:"'+t+'",searchValue:"'+i+'"})'),h._setCommand(h.user,t),h._resetNegate(),h},this.inData=function(e,t,i){t=void
0===t?"":h._getStr('"'+h._toStr(t)+'"');return c?h._append(t+".split(',').indexOf( jQuery.jgrid.getAccessor(this,'"+e+"') ) > -1"):h._append(t+".split(',').indexOf(this."+e+") > -1"),h._setCommand(h.inData,e),h._resetNegate(),h},this.groupBy=function(e,t,i,r){return h._hasData()?h._getGroup(o,e,t,i,r):null},this.orderBy=function(e,t,i,r,o){return t=Ye.jgrid.isNull(t)?"a":Ye.jgrid.trim(t.toString().toLowerCase()),Ye.jgrid.isNull(i)&&(i="text"),Ye.jgrid.isNull(r)&&(r="Y-m-d"),Ye.jgrid.isNull(o)&&(o=!1),u.push({by:e,dir:t="asc"!==(t="desc"!==t&&"descending"!==t?t:"d")&&"ascending"!==t?t:"a",type:i,datefmt:r,sfunc:o}),h},h;throw"data provides is not an array"}(e,null)},getMethod:function(e){return this.getAccessor(Ye.fn.jqGrid,e)},extend:function(e){Ye.extend(Ye.fn.jqGrid,e),this.no_legacy_api||Ye.fn.extend(e)},clearBeforeUnload:function(e){var
t,i=Ye("#"+Ye.jgrid.jqID(e))[0];if(i.grid){t=i.grid,Ye.jgrid.isFunction(t.emptyRows)&&t.emptyRows.call(i,!0,!0),Ye(document).off("mouseup.jqGrid"+i.p.id),Ye(t.hDiv).off("mousemove"),Ye(i).off();for(var
r=t.headers.length,o=["formatCol","sortData","updatepager","refreshIndex","setHeadCheckBox","constructTr","formatter","addXmlData","addJSONData","grid","p","addLocalData"],n=0;n<r;n++)t.headers[n].el=null;for(n
in
t)t.hasOwnProperty(n)&&(t[n]=null);for(n
in
i.p)i.p.hasOwnProperty(n)&&(i.p[n]=Array.isArray(i.p[n])?[]:null);for(r=o.length,n=0;n<r;n++)i.hasOwnProperty(o[n])&&(i[o[n]]=null,delete
i[o[n]])}},gridUnload:function(e){var
t,i,r,o;e&&(0===(e=Ye.jgrid.trim(e)).indexOf("#")&&(e=e.substring(1)),(t=Ye("#"+Ye.jgrid.jqID(e))[0]).grid)&&(i={id:Ye(t).attr("id"),cl:Ye(t).attr("class")},t.p.pager&&Ye(t.p.pager).off().empty().removeClass("ui-state-default ui-jqgrid-pager ui-corner-bottom"),(r=document.createElement("table")).className=i.cl,o=Ye.jgrid.jqID(t.id),Ye(r).removeClass("ui-jqgrid-btable ui-common-table").insertBefore("#gbox_"+o),1===Ye(t.p.pager).parents("#gbox_"+o).length&&Ye(t.p.pager).insertBefore("#gbox_"+o),Ye.jgrid.clearBeforeUnload(e),Ye("#gbox_"+o).remove(),Ye(r).attr({id:i.id}),Ye("#alertmod_"+Ye.jgrid.jqID(e)).remove())},gridDestroy:function(e){if(e){0===(e=Ye.jgrid.trim(e)).indexOf("#")&&(e=e.substring(1));var
t=Ye("#"+Ye.jgrid.jqID(e))[0];if(t.grid){t.p.pager&&Ye(t.p.pager).remove();try{Ye.jgrid.clearBeforeUnload(e),Ye("#gbox_"+Ye.jgrid.jqID(e)).remove()}catch(e){}}}},isElementInViewport:function(e){e=e.getBoundingClientRect();return 0<=e.left&&e.right<=(window.innerWidth||document.documentElement.clientWidth)},getTextWidth:function(e,t){var
i;return jQuery._cacheCanvas||(i=document.createElement("canvas"),document.createDocumentFragment().appendChild(i),jQuery._cacheCanvas=i.getContext("2d"),t&&(jQuery._cacheCanvas.font=t)),jQuery._cacheCanvas.measureText(Ye.jgrid.stripHtml(e)).width},getFont:function(e){e=window.getComputedStyle(e,null);return e.getPropertyValue("font-style")+" "+e.getPropertyValue("font-variant")+" "+e.getPropertyValue("font-weight")+" "+e.getPropertyValue("font-size")+" "+e.getPropertyValue("font-family")},setSelNavIndex:function(i,r){var
e=Ye(".ui-pg-button",i.p.pager);Ye.each(e,function(e,t){if(r===t)return i.p.navIndex=e,!1}),Ye(r).attr("tabindex","0")},splitSearch:function(e){var
t,i='{"groupOp":"'+e.mergeOper+'","groups":[';for(t
in
e)e.hasOwnProperty(t)&&"mergeOper"!==t&&(i+=null!==e[t]&&""!==e[t]&&"boolean"!=typeof
e[t]?e[t]+",":"",0);return-1===i.indexOf("[",i.length-"[".length)&&(i=i.slice(0,-1)),i+="]}"},getElemByAttrVal:function(e,t,i,r){"boolean"!=typeof
r&&(r=!1);var
o=Array.isArray(e)?e.length:0,n=0,a={},s=-1;if(0<o)for(;n<o;){if(e[n][t]===i){a=e[n],s=n;break}n++}return r?s:a},searchColOnEnter:function(e,t,i,r){var
a=Ye("#"+e)[0];if(a.grid){var
s,l,d=a.p.searchColOptions,e=!1;try{l=i.value}catch(r){l=""}if(a.p.frozenColumns&&(Ye(a.grid.bDiv).find(".jqgrid-searchcol >input#jqs_"+a.p.id+"_"+t).focus().val(l),e=!0),!a.p._ftsc){a.p._ftsc=!0,a.p._fthc=[],a.p._avc=[];for(var
o=0;o<a.p.colModel.length;o++)(a.p.colModel[o].hidden?a.p._fthc:a.p._avc).push(a.p.colModel[o].name);a.p._results={}}var
n=[...new
Set([...d._cnth,...d.visibleColumns])],c=new
Set([...n,...a.p._fthc]);if(Ye(a).jqGrid("hideCol",a.p._avc.filter(function(e){return!n.includes(e)})),a.grid&&null==t)for(var
p
in
a.p._results)a.p._results.hasOwnProperty(p)&&(l=a.p._results[p].v,h(p));else!a.grid||null===t&&void
0===t||h(t);var
u=[],g=0;for(o
in
a.p._results)"OR"===d.searchOp.toUpperCase()?u=[...new
Set([...u,...a.p._results[o].r])]:"AND"===d.searchOp.toUpperCase()&&(u=0===g?a.p._results[o].r:u.filter(function(e){return a.p._results[o].r.includes(e)}),g++);i=(u=Ye.isEmptyObject(a.p._results)?a.p._avc:u).concat(n);Ye(a).jqGrid("showCol",i),a.p.frozenColumns&&Ye(a.grid.fbDiv).find(".jqgrid-searchcol >input#jqs_"+a.p.id+"_"+t).val("").focus().val(l),a.p.frozenRows&&(e&&(a.p.frozenColumns=!1),Ye(a).trigger("jqGridAfterGridComplete.setFrozenRows"),e)&&(a.p.frozenColumns=!0)}function
h(e){var
t,i=Ye(a).jqGrid("getRowData",e),r=[];if(i&&l){for(var
o
in
i)if(!c.has(o)&&i.hasOwnProperty(o)){if(t=l,d.useCase||(i[o]=i[o].toLowerCase(),t=l.toLowerCase()),d.aOperands.includes(d.operand))switch(d.operand){case"cn":s=-1!==i[o].search(t);break;case"eq":s=i[o]===t;break;case"ne":s=i[o]!==t;break;case"bw":s=i[o].substring(0,t.length)===t;break;case"ew":var
n=i[o].length;s=i[o].substring(n-t.length,n)===t}s&&r.push(o)}a.p._results[e]={v:l,r:r}}else
i&&""===l&&a.p._results[e]&&delete
a.p._results[e]}},searchColOnKey:function(e,t,i,r){switch(r.key){case"ArrowRight":case"ArrowDown":case"ArrowUp":case"ArrowLeft":case"PageUp":case"PageDown":case"Alt":case"Control":case"Tab":case"Escape":case"Shift":return}setTimeout(function(){Ye.jgrid.searchColOnEnter(e,t,i,r)},50)},comboGrid:function(s,l,e){var
t=Ye.jgrid.randId("combo"),i="div"+t,r=e.datatype,d=(e.datatype="local",e.onSelectRow=function(e){var
e=Ye("#"+t).jqGrid("getRowData",e);Ye.isEmptyObject(e)||(e=Ye.jgrid.isFunction(l.return_fld)?l.return_fld.call(this,e):e[l.return_fld],Ye("#"+s).val(e),Ye("#"+i).hide())},e.data=[],e.scrollrows=!0,Ye("body").append("<div id='"+i+"'><table id='"+t+"'></table>"),e.pager&&Ye("body").append("<div id='"+e.pager+"'></div>"),Ye("body").append("</div>"),Ye("#"+t).jqGrid(e),Ye("#"+t).jqGrid("bindKeys",{onSelectRow:!1}),Ye("#"+s).attr("autocomplete","off").data("comboGrid",{grid:t,divgrid:i}),document.getElementById(s).getBoundingClientRect());Ye("#"+i).css({"background-color":"inherit",position:"absolute",top:d.top+50+"px",left:d.left+10+"px",zIndex:2e4}).hide(),Ye("#"+s).on("keydown",function(e){var
t,i=Ye(this).data("comboGrid").grid,r=Ye(this).data("comboGrid").divgrid,o=this;if(Ye("#"+r).is(":hidden")&&(d=document.getElementById(s).getBoundingClientRect(),Ye("#"+r).show().css({top:d.top+50+"px",left:d.left+10+"px"})),-1<Ye.inArray(e.key,["Enter","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"])){var
n=Ye.Event("keydown");switch(e.key){case"Enter":var
a=Ye("#"+i).jqGrid("getRowData",Ye("#"+i)[0].p.selrow);Ye.isEmptyObject(a)||(this.value=a[l.return_fld],Ye("#"+r).hide());break;case"Escape":Ye("#"+r).hide();break;case"ArrowUp":n.keyCode=38,Ye("#"+i).trigger(n);break;case"ArrowDown":n.keyCode=40,Ye("#"+i).trigger(n)}}else
t&&clearTimeout(t),setTimeout(function(){Ye("#"+i).jqGrid("filterInput",o.value,{defaultSearch:l.defaultSearch||"bw",selectFirstFound:!0})},100)}),l.data&&("string"==typeof
l.data?Ye("#"+t).jqGrid("setGridParam",{url:l.data}):Array.isArray(l.data)&&Ye("#"+t).jqGrid("setGridParam",{data:l.data})),Ye("#"+t).jqGrid("setGridParam",{datatype:r})},inColumnHeader:function(e,t){for(var
i=t.length,r=0;r<i;r++)if(t[r].startColumnName===e)return r;return-1},isServiceCol(e){return["cb","rn","subgrid","sc"].includes(e)},styleUI:{jQueryUI:{common:{disabled:"ui-state-disabled",highlight:"ui-state-highlight",hover:"ui-state-hover",cornerall:"ui-corner-all",cornertop:"ui-corner-top",cornerbottom:"ui-corner-bottom",hidden:"ui-helper-hidden",icon_base:"ui-icon",overlay:"ui-widget-overlay",active:"ui-state-active",error:"ui-state-error",button:"ui-state-default ui-corner-all",content:"ui-widget-content"},base:{entrieBox:"ui-widget ui-widget-content ui-corner-all",viewBox:"",headerTable:"",headerBox:"ui-state-default",rowTable:"",rowBox:"ui-widget-content",stripedTable:"ui-jqgrid-table-striped",footerTable:"",footerBox:"ui-widget-content",headerRowTable:"",headerRowBox:"ui-widget-content",headerDiv:"ui-state-default",gridtitleBox:"ui-widget-header ui-corner-top ui-helper-clearfix",customtoolbarBox:"ui-state-default",loadingBox:"ui-state-default ui-state-active",rownumBox:"ui-state-default",scrollBox:"ui-widget-content",multiBox:"",searchBox:"ui-widget-content ui-corner-all",searchSelect:"ui-widget-content ui-corner-all",pagerBox:"ui-state-default ui-corner-bottom",pagerTable:"",toppagerBox:"ui-state-default",pgInput:"ui-corner-all",pgSelectBox:"ui-widget-content ui-corner-all",pgButtonBox:"ui-corner-all",icon_first:"ui-icon-seek-first",icon_prev:"ui-icon-seek-prev",icon_next:"ui-icon-seek-next",icon_end:"ui-icon-seek-end",icon_asc:"ui-icon-triangle-1-n",icon_desc:"ui-icon-triangle-1-s",icon_caption_open:"ui-icon-circle-triangle-n",icon_caption_close:"ui-icon-circle-triangle-s"},modal:{modal:"ui-widget ui-widget-content ui-corner-all ui-dialog",header:"ui-widget-header ui-corner-all ui-helper-clearfix",content:"ui-widget-content",resizable:"ui-resizable-handle ui-resizable-se",icon_close:"ui-icon-closethick",icon_resizable:"ui-icon-gripsmall-diagonal-se"},celledit:{inputClass:"ui-widget-content ui-corner-all",selectClass:"ui-widget-content ui-corner-all"},inlinedit:{inputClass:"ui-widget-content ui-corner-all",selectClass:"ui-widget-content ui-corner-all",icon_edit_nav:"ui-icon-pencil",icon_add_nav:"ui-icon-plus",icon_save_nav:"ui-icon-disk",icon_cancel_nav:"ui-icon-cancel"},formedit:{inputClass:"ui-widget-content ui-corner-all",selectClass:"ui-widget-content ui-corner-all",icon_prev:"ui-icon-triangle-1-w",icon_next:"ui-icon-triangle-1-e",icon_save:"ui-icon-disk",icon_close:"ui-icon-close",icon_del:"ui-icon-scissors",icon_cancel:"ui-icon-cancel"},navigator:{icon_edit_nav:"ui-icon-pencil",icon_add_nav:"ui-icon-plus",icon_del_nav:"ui-icon-trash",icon_search_nav:"ui-icon-search",icon_refresh_nav:"ui-icon-refresh",icon_view_nav:"ui-icon-document",icon_newbutton_nav:"ui-icon-newwin"},grouping:{icon_plus:"ui-icon-circlesmall-plus",icon_minus:"ui-icon-circlesmall-minus"},filter:{table_widget:"ui-widget ui-widget-content",srSelect:"ui-widget-content ui-corner-all",srInput:"ui-widget-content ui-corner-all",menu_widget:"ui-widget ui-widget-content ui-corner-all",icon_search:"ui-icon-search",icon_reset:"ui-icon-arrowreturnthick-1-w",icon_query:"ui-icon-comment"},subgrid:{icon_plus:"ui-icon-plus",icon_minus:"ui-icon-minus",icon_open:"ui-icon-carat-1-sw"},treegrid:{icon_plus:"ui-icon-triangle-1-",icon_minus:"ui-icon-triangle-1-s",icon_leaf:"ui-icon-radio-off"},fmatter:{icon_edit:"ui-icon-pencil",icon_add:"ui-icon-plus",icon_save:"ui-icon-disk",icon_cancel:"ui-icon-cancel",icon_del:"ui-icon-trash"},colmenu:{menu_widget:"ui-widget ui-widget-content ui-corner-all",input_checkbox:"ui-widget ui-widget-content",filter_select:"ui-widget-content ui-corner-all",filter_input:"ui-widget-content ui-corner-all",icon_menu:"ui-icon-comment",icon_search_menu:"ui-icon-grip-dotted-vertical",icon_sort_asc:"ui-icon-arrow-1-n",icon_sort_desc:"ui-icon-arrow-1-s",icon_columns:"ui-icon-extlink",icon_filter:"ui-icon-calculator",icon_group:"ui-icon-grip-solid-horizontal",icon_freeze:"ui-icon-grip-solid-vertical",icon_move:"ui-icon-arrow-4",icon_new_item:"ui-icon-newwin",icon_toolbar_menu:"ui-icon-document",icon_group_op:"ui-icon-bullet",icon_oper_op:"ui-icon-transfer-e-w",icon_reset:"ui-icon-arrowreturnthick-1-w",icon_close:"ui-icon-close"}},Bootstrap:{common:{disabled:"ui-disabled",highlight:"success",hover:"active",cornerall:"",cornertop:"",cornerbottom:"",hidden:"",icon_base:"glyphicon",overlay:"ui-overlay",active:"active",error:"bg-danger",button:"btn btn-default",content:""},base:{entrieBox:"",viewBox:"table-responsive",headerTable:"table table-bordered",headerBox:"",rowTable:"table table-bordered",rowBox:"",stripedTable:"table-striped",footerTable:"table table-bordered",footerBox:"",headerRowTable:"table table-bordered",headerRowBox:"",headerDiv:"",gridtitleBox:"",customtoolbarBox:"",loadingBox:"row",rownumBox:"active",scrollBox:"",multiBox:"checkbox",pagerBox:"",pagerTable:"table",toppagerBox:"",pgInput:"form-control",pgSelectBox:"form-control",pgButtonBox:"",icon_first:"glyphicon-step-backward",icon_prev:"glyphicon-backward",icon_next:"glyphicon-forward",icon_end:"glyphicon-step-forward",icon_asc:"glyphicon-triangle-top",icon_desc:"glyphicon-triangle-bottom",icon_caption_open:"glyphicon-circle-arrow-up",icon_caption_close:"glyphicon-circle-arrow-down"},modal:{modal:"modal-content",header:"modal-header",title:"modal-title",content:"modal-body",resizable:"ui-resizable-handle ui-resizable-se",icon_close:"glyphicon-remove-circle",icon_resizable:"glyphicon-import"},celledit:{inputClass:"form-control",selectClass:"form-control"},inlinedit:{inputClass:"form-control",selectClass:"form-control",icon_edit_nav:"glyphicon-edit",icon_add_nav:"glyphicon-plus",icon_save_nav:"glyphicon-save",icon_cancel_nav:"glyphicon-remove-circle"},formedit:{inputClass:"form-control",selectClass:"form-control",icon_prev:"glyphicon-step-backward",icon_next:"glyphicon-step-forward",icon_save:"glyphicon-save",icon_close:"glyphicon-remove-circle",icon_del:"glyphicon-trash",icon_cancel:"glyphicon-remove-circle"},navigator:{icon_edit_nav:"glyphicon-edit",icon_add_nav:"glyphicon-plus",icon_del_nav:"glyphicon-trash",icon_search_nav:"glyphicon-search",icon_refresh_nav:"glyphicon-refresh",icon_view_nav:"glyphicon-info-sign",icon_newbutton_nav:"glyphicon-new-window"},grouping:{icon_plus:"glyphicon-triangle-right",icon_minus:"glyphicon-triangle-bottom"},filter:{table_widget:"table table-condensed",srSelect:"form-control",srInput:"form-control",menu_widget:"",icon_search:"glyphicon-search",icon_reset:"glyphicon-refresh",icon_query:"glyphicon-comment"},subgrid:{icon_plus:"glyphicon-triangle-right",icon_minus:"glyphicon-triangle-bottom",icon_open:"glyphicon-indent-left"},treegrid:{icon_plus:"glyphicon-triangle-right",icon_minus:"glyphicon-triangle-bottom",icon_leaf:"glyphicon-unchecked"},fmatter:{icon_edit:"glyphicon-edit",icon_add:"glyphicon-plus",icon_save:"glyphicon-save",icon_cancel:"glyphicon-remove-circle",icon_del:"glyphicon-trash"},colmenu:{menu_widget:"",input_checkbox:"",filter_select:"form-control",filter_input:"form-control",icon_menu:"glyphicon-menu-hamburger",icon_sort_asc:"glyphicon-sort-by-alphabet",icon_sort_desc:"glyphicon-sort-by-alphabet-alt",icon_columns:"glyphicon-list-alt",icon_filter:"glyphicon-filter",icon_group:"glyphicon-align-left",icon_freeze:"glyphicon-object-align-horizontal",icon_move:"glyphicon-move",icon_new_item:"glyphicon-new-window",icon_toolbar_menu:"glyphicon-menu-hamburger"}},Bootstrap4:{common:{disabled:"ui-disabled",highlight:"table-success",hover:"table-active",cornerall:"",cornertop:"",cornerbottom:"",hidden:"",overlay:"ui-overlay",active:"active",error:"alert-danger",button:"btn btn-light",content:""},base:{entrieBox:"",viewBox:"table-responsive",headerTable:"table table-bordered",headerBox:"",rowTable:"table table-bordered",rowBox:"",stripedTable:"table-striped",footerTable:"table table-bordered",footerBox:"",headerRowTable:"table table-bordered",headerRowBox:"",headerDiv:"",gridtitleBox:"",customtoolbarBox:"",loadingBox:"row",rownumBox:"active",scrollBox:"",multiBox:"checkbox",searchBox:"form-control",searchSelect:"form-control form-control-sm",pagerBox:"",pagerTable:"table",toppagerBox:"",pgInput:"form-control",pgSelectBox:"form-control",pgButtonBox:""},modal:{modal:"modal-content",header:"modal-header",title:"modal-title",content:"modal-body",resizable:"ui-resizable-handle ui-resizable-se",icon_close:"oi-circle-x",icon_resizable:"oi-circle-x"},celledit:{inputClass:"form-control",selectClass:"form-control"},inlinedit:{inputClass:"form-control",selectClass:"form-control"},formedit:{inputClass:"form-control",selectClass:"form-control"},navigator:{},grouping:{},filter:{table_widget:"table table-condensed",srSelect:"form-control",srInput:"form-control",menu_widget:""},subgrid:{},treegrid:{},fmatter:{},colmenu:{menu_widget:"",input_checkbox:"",filter_select:"form-control",filter_input:"form-control"}},Bootstrap5:{common:{disabled:"ui-disabled",highlight:"table-success",hover:"table-active",cornerall:"",cornertop:"",cornerbottom:"",hidden:"",overlay:"ui-overlay",active:"active",error:"alert alert-danger",button:"btn btn-light",content:""},base:{entrieBox:"",viewBox:"table-responsive",headerTable:"table table-bordered",headerBox:"",rowTable:"table table-bordered",rowBox:"",stripedTable:"table-striped",footerTable:"table table-bordered",footerBox:"",headerRowTable:"table table-bordered",headerRowBox:"",headerDiv:"",gridtitleBox:"",customtoolbarBox:"",loadingBox:"row",rownumBox:"active",scrollBox:"",multiBox:"checkbox",searchBox:"form-control",searchSelect:"form-select",pagerBox:"",pagerTable:"table",toppagerBox:"",pgInput:"form-control",pgSelectBox:"form-select",pgButtonBox:""},modal:{modal:"modal-content",header:"modal-header",title:"modal-title",content:"modal-body",resizable:"ui-resizable-handle ui-resizable-se",icon_close:"oi-circle-x",icon_resizable:"oi-circle-x"},celledit:{inputClass:"form-control",selectClass:"form-select"},inlinedit:{inputClass:"form-control",selectClass:"form-select"},formedit:{inputClass:"form-control",selectClass:"form-select"},navigator:{},grouping:{},filter:{table_widget:"table table-sm",srSelect:"form-select",srInput:"form-control",menu_widget:""},subgrid:{},treegrid:{},fmatter:{},colmenu:{menu_widget:"",input_checkbox:"",filter_select:"form-select",filter_input:"form-control"}}},iconSet:{Iconic:{common:{icon_base:"oi"},base:{icon_first:"oi-media-step-backward",icon_prev:"oi-caret-left",icon_next:"oi-caret-right",icon_end:"oi-media-step-forward",icon_asc:"oi-caret-top",icon_desc:"oi-caret-bottom",icon_caption_open:"oi-collapse-up",icon_caption_close:"oi-expand-down"},modal:{icon_close:"oi-circle-x",icon_resizable:"oi-plus"},inlinedit:{icon_edit_nav:"oi-pencil",icon_add_nav:"oi-plus",icon_save_nav:"oi-check",icon_cancel_nav:"oi-action-undo"},formedit:{icon_prev:"oi-chevron-left",icon_next:"oi-chevron-right",icon_save:"oi-check",icon_close:"oi-ban",icon_del:"oi-delete",icon_cancel:"oi-ban"},navigator:{icon_edit_nav:"oi-pencil",icon_add_nav:"oi-plus",icon_del_nav:"oi-trash",icon_search_nav:"oi-zoom-in",icon_refresh_nav:"oi-reload",icon_view_nav:"oi-browser",icon_newbutton_nav:"oi-book"},grouping:{icon_plus:"oi-caret-right",icon_minus:"oi-caret-bottom"},filter:{icon_search:"oi-magnifying-glass",icon_reset:"oi-reload",icon_query:"oi-comment-square"},subgrid:{icon_plus:"oi-chevron-right",icon_minus:"oi-chevron-bottom",icon_open:"oi-expand-left"},treegrid:{icon_plus:"oi-plus",icon_minus:"oi-minus",icon_leaf:"oi-media-record"},fmatter:{icon_edit:"oi-pencil",icon_add:"oi-plus",icon_save:"oi-check",icon_cancel:"oi-action-undo",icon_del:"oi-trash"},colmenu:{icon_menu:"oi-list",icon_sort_asc:"oi-sort-ascending",icon_sort_desc:"oi-sort-descending",icon_columns:"oi-project",icon_filter:"oi-magnifying-glass",icon_group:"oi-list-rich",icon_freeze:"oi-spreadsheet",icon_move:"oi-move",icon_new_item:"oi-external-link",icon_toolbar_menu:"oi-menu",icon_group_op:"",icon_oper_op:"",icon_reset:"oi-reload",icon_close:"oi-ban"}},Octicons:{common:{icon_base:"octicon"},base:{icon_first:"octicon-triangle-left",icon_prev:"octicon-chevron-left",icon_next:"octicon-chevron-right",icon_end:"octicon-triangle-right",icon_asc:"octicon-triangle-up",icon_desc:"octicon-triangle-down",icon_caption_open:"octicon-triangle-up",icon_caption_close:"octicon-triangle-down"},modal:{icon_close:"octicon-x",icon_resizable:"octicon-plus"},inlinedit:{icon_edit_nav:"octicon-pencil",icon_add_nav:"octicon-plus",icon_save_nav:"octicon-check",icon_cancel_nav:"octicon-circle-slash"},formedit:{icon_prev:"octicon-chevron-left",icon_next:"octicon-chevron-right",icon_save:"octicon-check",icon_close:"octicon-x",icon_del:"octicon-trashcan",icon_cancel:"octicon-circle-slash"},navigator:{icon_edit_nav:"octicon-pencil",icon_add_nav:"octicon-plus",icon_del_nav:"octicon-trashcan",icon_search_nav:"octicon-search",icon_refresh_nav:"octicon-sync",icon_view_nav:"octicon-file",icon_newbutton_nav:"octicon-link-external"},grouping:{icon_plus:"octicon-triangle-right",icon_minus:"octicon-triangle-down"},filter:{icon_search:"octicon-search",icon_reset:"octicon-sync",icon_query:"octicon-file-code"},subgrid:{icon_plus:"octicon-triangle-right",icon_minus:"octicon-triangle-down",icon_open:"octicon-git-merge"},treegrid:{icon_plus:"octicon-triangle-right",icon_minus:"octicon-triangle-down",icon_leaf:"octicon-primitive-dot"},fmatter:{icon_edit:"octicon-pencil",icon_add:"octicon-plus",icon_save:"octicon-check",icon_cancel:"octicon-circle-slash",icon_del:"octicon-trashcan"},colmenu:{icon_menu:"octicon-grabber",icon_sort_asc:"octicon-arrow-up",icon_sort_desc:"octicon-arrow-down",icon_columns:"octicon-repo",icon_filter:"octicon-search",icon_group:"octicon-list-unordered",icon_freeze:"octicon-repo",icon_move:"octicon-git-compare",icon_new_item:"octicon-link-external",icon_toolbar_menu:"octicon-three-bars",icon_group_op:"",icon_oper_op:"",icon_reset:"octicon-sync",icon_close:"octicon-x"}},fontAwesome:{common:{icon_base:"fas"},base:{icon_first:"fa-step-backward",icon_prev:"fa-backward",icon_next:"fa-forward",icon_end:"fa-step-forward",icon_asc:"fa-caret-up",icon_desc:"fa-caret-down",icon_caption_open:"fa-caret-square-up",icon_caption_close:"fa-caret-square-down "},modal:{icon_close:"fa-window-close",icon_resizable:"fa-plus"},inlinedit:{icon_edit_nav:"fa-edit",icon_add_nav:"fa-plus",icon_save_nav:"fa-save",icon_cancel_nav:"fa-replay"},formedit:{icon_prev:"fa-chevron-left",icon_next:"fa-chevron-right",icon_save:"fa-save",icon_close:"fa-window-close",icon_del:"fa-trash",icon_cancel:"fa-times"},navigator:{icon_edit_nav:"fa-edit",icon_add_nav:"fa-plus",icon_del_nav:"fa-trash",icon_search_nav:"fa-search",icon_refresh_nav:"fa-sync",icon_view_nav:"fa-sticky-note",icon_newbutton_nav:"fa-external-link-alt"},grouping:{icon_plus:"fa-caret-right",icon_minus:"fa-caret-down"},filter:{icon_search:"fa-search",icon_reset:"fa-reply",icon_query:"fa-pen-square "},subgrid:{icon_plus:"fa-arrow-circle-right",icon_minus:"fa-arrow-circle-down",icon_open:"fa-ellipsis-v"},treegrid:{icon_plus:"fa-plus",icon_minus:"fa-minus",icon_leaf:"fa-circle"},fmatter:{icon_edit:"fa-edit",icon_add:"fa-plus",icon_save:"fa-save",icon_cancel:"fa-undo",icon_del:"fa-trash"},colmenu:{icon_menu:"fa-ellipsis-v",icon_sort_asc:"fa-sort-amount-up",icon_sort_desc:"fa-sort-amount-down",icon_columns:"fa-columns",icon_filter:"fa-filter",icon_group:"fa-object-group",icon_freeze:"fa-snowflake",icon_move:"fa-expand-arrows-alt",icon_new_item:"fa-external-link-alt",icon_toolbar_menu:"fa-list",icon_group_op:"",icon_oper_op:"",icon_reset:"fa-reply",icon_close:"fa-window-close"}},Bootstrap5:{common:{icon_base:"bi"},base:{icon_first:"bi-chevron-bar-left",icon_prev:"bi-chevron-left",icon_next:"bi-chevron-right",icon_end:"bi-chevron-bar-right",icon_asc:"bi-caret-up-fill",icon_desc:"bi-caret-down-fill",icon_caption_open:"bi-arrows-collapse",icon_caption_close:"bi-arrows-expand"},modal:{icon_close:"bi-x-lg",icon_resizable:"bi-box-arrow-in-down-right"},inlinedit:{icon_edit_nav:"bi-pencil-square",icon_add_nav:"bi-plus-square",icon_save_nav:"bi-save",icon_cancel_nav:"bi-x-square"},formedit:{icon_prev:"bi-chevron-left",icon_next:"bi-chevron-right",icon_save:"bi-save",icon_close:"bi-x-square",icon_del:"bi-trash",icon_cancel:"bi-x-octagon"},navigator:{icon_edit_nav:"bi-pencil-square",icon_add_nav:"bi-plus-square",icon_del_nav:"bi-trash",icon_search_nav:"bi-search",icon_refresh_nav:"bi-arrow-clockwise",icon_view_nav:"bi-view-list",icon_newbutton_nav:"bi-window"},grouping:{icon_plus:"bi-caret-right",icon_minus:"bi-caret-down"},filter:{icon_search:"bi-search",icon_reset:"bi-arrow-clockwise",icon_query:"bi-journal-code"},subgrid:{icon_plus:"bi-chevron-right",icon_minus:"bi-chevron-down",icon_open:"bi-arrow-bar-right"},treegrid:{icon_plus:"bi-plus-square-dotted",icon_minus:"bi-dash-square-dotted",icon_leaf:"bi-circle"},fmatter:{icon_edit:"bi-pencil-square",icon_add:"bi-plus-square",icon_save:"bi-save",icon_cancel:"bi-x-square",icon_del:"bi-trash"},colmenu:{icon_menu:"bi-list",icon_sort_asc:"bi-sort-alpha-down",icon_sort_desc:"bi-sort-alpha-up",icon_columns:"bi-columns",icon_filter:"bi-search",icon_group:"bi-collection-play",icon_freeze:"bi-layout-text-sidebar-reverse",icon_move:"bi-arrows-move",icon_new_item:"bi-window",icon_toolbar_menu:"bi-card-text",icon_group_op:"",icon_oper_op:"",icon_reset:"bi-arrow-clockwise",icon_close:"bi-x-square"}}}}),Ye.fn.jqGrid=function(Qe){if("string"!=typeof
Qe)return this.each(function(){if(!this.grid){Ye.jgrid.isNull(Qe)||void
0===Qe.data||(z=Qe.data,Qe.data=[]);var
w=Ye.extend(!0,{url:"",height:150,defaultColWidth:150,page:1,rowNum:20,rowTotal:null,records:0,pager:"",pgbuttons:!0,pginput:!0,colModel:[],rowList:[],colNames:[],sortorder:"asc",sortname:"",datatype:"xml",mtype:"GET",altRows:!1,selarrrow:[],preserveSelection:!1,savedRow:[],shrinkToFit:!0,xmlReader:{},jsonReader:{},subGrid:!1,subGridModel:[],reccount:0,lastpage:0,lastsort:0,selrow:null,beforeSelectRow:null,onSelectRow:null,onSortCol:null,ondblClickRow:null,onRightClickRow:null,onPaging:null,onSelectAll:null,onInitGrid:null,loadComplete:null,gridComplete:null,loadError:null,loadBeforeSend:null,afterInsertRow:null,beforeRequest:null,beforeProcessing:null,onHeaderClick:null,viewrecords:!1,loadonce:!1,multiselect:!1,multikey:!1,multiboxonly:!1,multimail:!1,multiselectWidth:30,editurl:null,search:!1,caption:"",hidegrid:!0,hiddengrid:!1,postData:{},userData:{},treeGrid:!1,treeGridModel:"nested",treeReader:{},treeANode:-1,ExpandColumn:null,tree_root_level:0,prmNames:{page:"page",rows:"rows",sort:"sidx",order:"sord",search:"_search",nd:"nd",id:"id",oper:"oper",editoper:"edit",addoper:"add",deloper:"del",subgridid:"id",npage:null,totalrows:"totalrows"},forceFit:!1,gridstate:"visible",cellEdit:!1,cellsubmit:"remote",nv:0,loadui:"enable",toolbar:[!1,""],scroll:!1,deselectAfterSort:!0,scrollrows:!1,autowidth:!1,scrollOffset:Ye.jgrid.scrollbarWidth()+3,cellLayout:5,subGridWidth:20,gridview:!0,rownumWidth:35,rownumbers:!1,pagerpos:"center",recordpos:"right",footerrow:!1,userDataOnFooter:!1,headerrow:!1,userDataOnHeader:!1,hoverrows:!0,viewsortcols:[!1,"vertical",!0],resizeclass:"",autoencode:!1,remapColumns:[],ajaxGridOptions:{},direction:"ltr",toppager:!1,headertitles:!1,scrollTimeout:40,data:[],_index:{},grouping:!1,groupingView:{groupField:[],groupOrder:[],groupText:[],groupColumnShow:[],groupSummary:[],showSummaryOnHide:!1,sortitems:[],sortnames:[],summary:[],summaryval:[],plusicon:"",minusicon:"",displayField:[],groupSummaryPos:[],formatDisplayField:[],_locgr:!1},groupHeaderOn:!1,ignoreCase:!0,cmTemplate:{},idPrefix:"",multiSort:!1,minColWidth:33,scrollPopUp:!1,scrollTopOffset:0,scrollLeftOffset:"100%",scrollMaxBuffer:0,storeNavOptions:!1,regional:"en",styleUI:"jQueryUI",iconSet:"Iconic",responsive:!1,forcePgButtons:!1,restoreCellonFail:!0,editNextRowCell:!1,colFilters:{},colMenu:!1,colMenuCustom:{},colMenuColumnDone:null,colMenuBeforeProcess:null,colSpanHeader:[],treeGrid_bigData:!1,treeGrid_rootParams:{otherData:{}},treeGrid_beforeRequest:null,treeGrid_afterLoadComplete:null,useNameForSearch:!1,formatFooterData:!1,formatHeaderData:!1,mergeSearch:!1,searchModules:{mergeOper:"AND",filterInput:!0,filterToolbar:!0,searchGrid:!0,colMenuSearch:!0},emptyRecordRow:!0,ariaBody:!1,searchCols:!1,searchColOptions:{colWidth:90,searchOp:"OR",operand:"cn",useCase:!1,colName:"Search Col",colmenu:!0,searchOnEnter:!0,aOperands:["cn","bw","ew","eq","ne"],_cnth:["cb","rn","sc","subgrid","col_name"],visibleColumns:[]}},Ye.jgrid.defaults,Qe),K=(void
0!==z&&(w.data=z,Qe.data=z),this),j={headers:[],cols:[],footers:[],hrheaders:[],dragStart:function(e,t,i){var
r=Ye(this.bDiv).offset().left,o=parseInt(w.colModel[e].minResizeWidth||w.minColWidth,10);isNaN(o)&&(o=33),this.resizing={idx:e,startX:t.pageX,sOL:t.pageX-r,minW:o},this.hDiv.style.cursor="col-resize",this.curGbox=Ye("#rs_m"+Ye.jgrid.jqID(w.id),"#gbox_"+Ye.jgrid.jqID(w.id)),this.curGbox.css({display:"block",left:t.pageX-r,top:i[1],height:i[2]}),Ye(K).triggerHandler("jqGridResizeStart",[t,e]),Ye.jgrid.isFunction(w.resizeStart)&&w.resizeStart.call(K,t,e),document.onselectstart=function(){return!1}},dragMove:function(e){var
t,i,r,o;this.resizing&&(e=e.pageX-this.resizing.startX,t=this.headers[this.resizing.idx],(i="ltr"===w.direction?t.width+e:t.width-e)>this.resizing.minW)&&(this.curGbox.css({left:this.resizing.sOL+e}),!0===w.forceFit?(r=this.headers[this.resizing.idx+w.nv],(o="ltr"===w.direction?r.width-e:r.width+e)>this.resizing.minW&&(t.newWidth=i,r.newWidth=o)):(this.newWidth="ltr"===w.direction?w.tblwidth+e:w.tblwidth-e,t.newWidth=i))},dragEnd:function(e,t){var
i,r;this.hDiv.style.cursor="default",void
0===t&&(t=!0),this.resizing&&(i=this.resizing.idx,r=this.headers[i].newWidth||this.headers[i].width,r=parseInt(r,10),this.resizing=!1,Ye("#rs_m"+Ye.jgrid.jqID(w.id)).css("display","none"),w.colModel[i].width=r,this.headers[i].width=r,this.headers[i].el.style.width=r+"px",this.cols[i].style.width=r+"px",0<this.footers.length&&(this.footers[i].style.width=r+"px"),0<this.hrheaders.length&&(this.hrheaders[i].style.width=r+"px"),!0===w.forceFit?(r=this.headers[i+w.nv].newWidth||this.headers[i+w.nv].width,this.headers[i+w.nv].width=r,this.headers[i+w.nv].el.style.width=r+"px",this.cols[i+w.nv].style.width=r+"px",0<this.footers.length&&(this.footers[i+w.nv].style.width=r+"px"),0<this.hrheaders.length&&(this.hrheaders[i+w.nv].style.width=r+"px"),w.colModel[i+w.nv].width=r):(w.tblwidth=this.newWidth||w.tblwidth,Ye(this.bDiv).find("table").first().css("width",w.tblwidth+"px"),Ye(this.hDiv).find("table").first().css("width",w.tblwidth+"px"),this.hDiv.scrollLeft=this.bDiv.scrollLeft,w.footerrow&&(Ye(this.sDiv).find("table").first().css("width",w.tblwidth+"px"),this.sDiv.scrollLeft=this.bDiv.scrollLeft),w.headerrow&&(Ye(this.hrDiv).find("table").first().css("width",w.tblwidth+"px"),this.hrDiv.scrollLeft=this.bDiv.scrollLeft)),e&&(Ye(K).triggerHandler("jqGridResizeStop",[r,i]),Ye.jgrid.isFunction(w.resizeStop))&&w.resizeStop.call(K,r,i),w.frozenColumns)&&t&&(Ye("#"+Ye.jgrid.jqID(w.id)).jqGrid("destroyFrozenColumns"),Ye("#"+Ye.jgrid.jqID(w.id)).jqGrid("setFrozenColumns")),this.curGbox=null,document.onselectstart=function(){return!0}},populateVisible:function(){j.timer&&clearTimeout(j.timer),j.timer=null;var
e=Ye(j.bDiv).height();if(e){var
t,i,r,o,n,a,s,l,d,c=Ye(j.bDiv).find("table").first();if(c[0].rows.length)try{t=(i=c[0].rows[1])&&Ye(i).outerHeight()||j.prevRowHeight}catch(e){t=j.prevRowHeight}t&&(j.prevRowHeight=t,i=w.rowNum,r=j.scrollTop=j.bDiv.scrollTop,a=t*i,(n=(o=Math.round(c.position().top)-r)+c.height())<e&&o<=0&&(void
0===w.lastpage||(parseInt((n+r+a-1)/a,10)||0)<=w.lastpage)&&(l=parseInt((e-n+a-1)/a,10)||1,o=0<=n||l<2||!0===w.scroll?(s=(Math.round((n+r)/a)||0)+1,-1):1),0<o&&(s=(parseInt(r/a,10)||0)+1,l=(parseInt((r+e)/a,10)||0)+2-s,d=!0),!l||w.lastpage&&(s>w.lastpage||1===w.lastpage||s===w.page&&s===w.lastpage)||(j.hDiv.loading?j.timer=setTimeout(j.populateVisible,w.scrollTimeout):(w.page=s,(d=0<w.scrollMaxBuffer&&(0<i&&w.scrollMaxBuffer<i&&(w.scrollMaxBuffer=i+1),w.reccount>w.scrollMaxBuffer-(0<i?i:0))?!0:d)&&(j.selectionPreserver(c[0]),j.emptyRows.call(c[0],!0,!1)),j.populate(l)),w.scrollPopUp&&!Ye.jgrid.isNull(w.lastpage)&&(Ye("#scroll_g"+w.id).show().html(Ye.jgrid.template(Ye.jgrid.getRegional(K,"defaults.pgtext",w.pgtext),w.page,w.lastpage)).css({top:w.scrollTopOffset+r*((parseInt(w.height,10)-45)/(parseInt(t,10)*parseInt(w.records,10)))+"px",left:w.scrollLeftOffset}),Ye(this).mouseout(function(){Ye("#scroll_g"+w.id).hide()}))))}},scrollGrid:function(){if(!j.bScroll){var
e;j.hScroll=!0,w.scroll&&(e=j.bDiv.scrollTop,void
0===j.scrollTop&&(j.scrollTop=0),e!==j.scrollTop)&&(j.scrollTop=e,j.timer&&clearTimeout(j.timer),j.timer=setTimeout(j.populateVisible,w.scrollTimeout)),j.hDiv.scrollLeft=j.bDiv.scrollLeft,w.footerrow&&(j.sDiv.scrollLeft=j.bDiv.scrollLeft),w.headerrow&&(j.hrDiv.scrollLeft=j.bDiv.scrollLeft),w.frozenColumns&&Ye(j.fbDiv).scrollTop(j.bDiv.scrollTop);try{Ye("#column_menu").remove()}catch(e){}}j.bScroll=!1},selectionPreserver:function(t){function
i(){var
e;if(r.multiselect&&n&&0<n.length)for(e=0;e<n.length;e++)n[e]&&Ye(t).jqGrid("setSelection",n[e],!1,"_sp_");!r.multiselect&&o&&Ye(t).jqGrid("setSelection",o,!1,null),t.grid.bDiv.scrollLeft=a,Ye(t).off(".selectionPreserver",i)}var
r=t.p,o=r.selrow,n=r.selarrrow?Ye.makeArray(r.selarrrow):null,a=t.grid.bDiv.scrollLeft;Ye(t).on("jqGridGridComplete.selectionPreserver",i)},hScroll:!1,bScroll:!1};if("TABLE"!==this.tagName.toUpperCase()||Ye.jgrid.isNull(this.id))alert("Element is not a table or has no id!");else
if(void
0!==document.documentMode&&document.documentMode<=5)alert("Grid can not be used in this ('quirks') mode!");else{var
N,k,v,X,e=0;for(k
in
Ye.jgrid.regional)Ye.jgrid.regional.hasOwnProperty(k)&&(0===e&&(N=k),e++);if(1===e&&N!==w.regional&&(w.regional=N),Ye(this).empty().attr("tabindex","0"),this.p=w,this.p.useProp=!!Ye.fn.prop,0===this.p.colNames.length)for(e=0;e<this.p.colModel.length;e++)this.p.colNames[e]=this.p.colModel[e].label||this.p.colModel[e].name;if(this.p.colNames.length!==this.p.colModel.length)alert(Ye.jgrid.getRegional(this,"errors.model"));else{"Bootstrap4"===K.p.styleUI&&Ye.jgrid.iconSet.hasOwnProperty(K.p.iconSet)&&Ye.extend(!0,Ye.jgrid.styleUI.Bootstrap4,Ye.jgrid.iconSet[K.p.iconSet]),"Bootstrap5"===K.p.styleUI&&Ye.jgrid.iconSet.hasOwnProperty(K.p.iconSet)&&Ye.extend(!0,Ye.jgrid.styleUI.Bootstrap5,Ye.jgrid.iconSet[K.p.iconSet]);var
M,Q=Ye.jgrid.getMethod("getStyleUI"),Y=K.p.styleUI+".common",b=Q(Y,"disabled",!0),$=Q(Y,"highlight",!0),D=Q(Y,"hover",!0),z=Q(Y,"cornerall",!0),q=Q(Y,"icon_base",!0),C=Ye.jgrid.styleUI[K.p.styleUI||"jQueryUI"].colmenu,R=Ye.jgrid.msie(),I=[],G=[],B=[],Y=K.p.styleUI+".base",t=Ye("<div "+Q(Y,"viewBox",!1,"ui-jqgrid-view")+" role='grid'></div>"),O=(K.p.direction=Ye.jgrid.trim(K.p.direction.toLowerCase()),K.p._ald=!1,-1===Ye.inArray(K.p.direction,["ltr","rtl"])&&(K.p.direction="ltr"),v=K.p.direction,Ye(t).insertBefore(this),Ye(this).appendTo(t),Ye("<div "+Q(Y,"entrieBox",!1,"ui-jqgrid")+"></div>")),A=(Ye(O).attr({id:"gbox_"+this.id,dir:v}).insertBefore(t),Ye(t).attr("id","gview_"+this.id).appendTo(O),Ye("<div "+Q(K.p.styleUI+".common","overlay",!1,"jqgrid-overlay")+" id='lui_"+this.id+"'></div>").insertBefore(t),Ye("<div "+Q(Y,"loadingBox",!1,"loading")+" id='load_"+this.id+"'>"+Ye.jgrid.getRegional(K,"defaults.loadtext",this.p.loadtext)+"</div>").insertBefore(t),Ye(this).attr({role:"presentation","aria-multiselectable":!!this.p.multiselect,"aria-labelledby":"gbox_"+this.id}),Ye.jgrid.getFont(K)),J=function(e,t){return void
0===t&&(t=0),e=parseInt(e,10),isNaN(e)?t:e},F=function(e,t,i,r,o,n){var
a=K.p.colModel[e],s=a.align,l='style="',d=a.classes,c=a.name,p=[];return s&&(l+="text-align:"+s+";"),!0===a.hidden&&(l+="display:none;"),0===t?l+="width: "+j.headers[e].width+"px;":(Ye.jgrid.isFunction(a.cellattr)||"string"==typeof
a.cellattr&&!Ye.jgrid.isNull(Ye.jgrid.cellattr)&&Ye.jgrid.isFunction(Ye.jgrid.cellattr[a.cellattr]))&&(s=(Ye.jgrid.isFunction(a.cellattr)?a.cellattr:Ye.jgrid.cellattr[a.cellattr]).call(K,o,i,r,a,n))&&"string"==typeof
s&&(-1<s.indexOf("title")&&(a.title=!1),-1<s.indexOf("class")&&(d=void
0),2===(p=(s=String(s).replace(/\s+\=/g,"=")).split("style=")).length?(p[1]=Ye.jgrid.trim(p[1]),0!==p[1].indexOf("'")&&0!==p[1].indexOf('"')||(p[1]=p[1].substring(1)),l+=p[1].replace(/'/gi,'"')):l+='"'),p.length?2<p.length&&(p[0]=""):(p[0]="",l+='"'),(l=(l+=(void
0!==d?' class="'+d+'"':"")+(a.title&&i?' title="'+Ye.jgrid.stripHtml(i)+'"':""))+(' aria-describedby="'+K.p.id+"_"+c+'"'))+p[0]},P=function(e){return Ye.jgrid.isNull(e)||""===e?"&#160;":K.p.autoencode?Ye.jgrid.htmlEncode(e):String(e)},T=function(e,t,i,r,o){var
n=K.p.colModel[i],e={rowId:e=""!==String(K.p.idPrefix)?Ye.jgrid.stripPref(K.p.idPrefix,e):e,colModel:n,gid:K.p.id,pos:i,styleUI:K.p.styleUI},i=void
0!==n.formatter?Ye.jgrid.isFunction(n.formatter)?n.formatter.call(K,t,e,r,o):Ye.fmatter?Ye.fn.fmatter.call(K,n.formatter,t,e,r,o):P(t):P(t);return K.p.autoResizing&&n.autosize&&(n._maxsize||(n._maxsize=n.canvas_width),n._maxsize=Math.max(Ye.jgrid.isFunction(n.sizingStringFunc)?n.sizingStringFunc.call(K,i,A,e,r):Ye.jgrid.getTextWidth(i,A),n._maxsize)),i},Z=function(e,t,i,r,o,n){t=T(e,t,i,o,"add");return'<td role="gridcell" '+F(i,r,t,o,e,n)+">"+t+"</td>"},ee=function(e,t,i,r,o){o='<input role="checkbox" type="checkbox" id="jqg_'+K.p.id+"_"+e+'" '+o+' name="jqg_'+K.p.id+"_"+e+'"'+(r?'checked="checked"':"")+"/>";return'<td role="gridcell" '+F(t,i,"",null,e,!0)+">"+o+"</td>"},te=function(e,t,i,r,o){i=(parseInt(i,10)-1)*parseInt(r,10)+1+t;return'<td role="gridcell" '+o+" "+F(e,t,i,null,t,!0)+">"+i+"</td>"},ie=function(e,t,i,r){var
o=K.p.searchColOptions.searchOnEnter?" onchange=\"$.jgrid.searchColOnEnter('"+K.p.id+"',"+e+', this)"':" onkeydown=\"$.jgrid.searchColOnKey('"+K.p.id+"',"+e+',this, event)"',r='<input type="text" id="jqs_'+K.p.id+"_"+e+'" name="jqs_'+K.p.id+"_"+e+'" '+r+o+"/>";return'<td role="gridcell" '+F(t,i,"",null,e,!0)+">"+r+"</td>"},re=function(e){for(var
t,i=[],r=0,o=0;o<K.p.colModel.length;o++)"cb"!==(t=K.p.colModel[o]).name&&"subgrid"!==t.name&&"rn"!==t.name&&"sc"!==t.name&&(i[r]="local"===e?t.name:"xml"===e||"xmlstring"===e?t.xmlmap||t.name:t.jsonmap||t.name,!1!==K.p.keyName&&!0===t.key&&(K.p.keyName=i[r],K.p.keyIndex=r),r++);return i},oe=function(t){var
e=K.p.remapColumns;return e&&e.length||(e=Ye.map(K.p.colModel,function(e,t){return t})),e=t?Ye.map(e,function(e){return e<t?null:e-t}):e},ne=function(e,t){var
i;this.p.deepempty?Ye(this.rows).slice(1).remove():(i=0<this.rows.length?this.rows[0]:null,Ye(this.firstChild).empty().append(i)),e&&this.p.scroll&&(Ye(this.grid.bDiv.firstChild).css({height:"auto"}),Ye(this.grid.bDiv.firstChild.firstChild).css({height:"0px",display:"none"}),0!==this.grid.bDiv.scrollTop)&&(this.grid.bDiv.scrollTop=0),!0===t&&(this.p.data=[],this.p._index={})},H=function(){var
e,t,i,r,o,n,a,s,l,d,c,p=K.p,u=p.data,g=u.length,h=p.localReader,f=p.colModel,m=h.cell,v=(!0===p.multiselect?1:0)+(!0===p.subGrid?1:0)+(!0===p.rownumbers?1:0)+(!0===p.searchCols?1:0),b=p.scroll?Ye.jgrid.randId():1;if("local"===p.datatype&&!0===h.repeatitems)for(l=oe(v),d=re("local"),r=!1===p.keyName?Ye.jgrid.isFunction(h.id)?h.id.call(K,u):h.id:p.keyName,e=0;e<g;e++){for(i=u[e],void
0===(o=Ye.jgrid.getAccessor(i,r))&&void
0===(o="number"!=typeof
r||Ye.jgrid.isNull(f[r+v])?o:Ye.jgrid.getAccessor(i,f[r+v].name))&&(o=b+e,m)&&(n=Ye.jgrid.getAccessor(i,m)||i,o=Ye.jgrid.isNull(n)||void
0===n[r]?o:n[r],0),(s={})[h.id]=o,m&&(i=Ye.jgrid.getAccessor(i,m)||i),c=Array.isArray(i)?l:d,t=0;t<c.length;t++)a=Ye.jgrid.getAccessor(i,c[t]),s[f[t+v].name]=a;u[e]=s}},ae=function(){var
e,t,i=K.p.data.length,r=!1!==K.p.keyName?K.p.keyName:K.p.localReader.id;for(K.p._index={},e=0;e<i;e++)void
0===(t=Ye.jgrid.getAccessor(K.p.data[e],r))&&(t=String(e+1)),K.p._index[t]=e},se=function(e,t,i,r,o){var
n,a="-1",s="",t=t?"display:none;":"",l=Ye(K).triggerHandler("jqGridRowAttr",[r,o,e]);if("object"!=typeof
l&&(l=Ye.jgrid.isFunction(K.p.rowattr)?K.p.rowattr.call(K,r,o,e):"string"==typeof
K.p.rowattr&&!Ye.jgrid.isNull(Ye.jgrid.rowattr)&&Ye.jgrid.isFunction(Ye.jgrid.rowattr[K.p.rowattr])?Ye.jgrid.rowattr[K.p.rowattr].call(K,r,o,e):{}),!Ye.isEmptyObject(l)){l.hasOwnProperty("id")&&(e=l.id,delete
l.id),l.hasOwnProperty("tabindex")&&(a=l.tabindex,delete
l.tabindex),l.hasOwnProperty("style")&&(t+=l.style,delete
l.style),l.hasOwnProperty("class")&&(i+=" "+l.class,delete
l.class);try{delete
l.role}catch(e){}for(n
in
l)l.hasOwnProperty(n)&&(s+=" "+n+"="+l[n])}return'<tr role="row" id="'+e+'" tabindex="'+a+'" class="'+i+'"'+(""===t?"":' style="'+t+'"')+s+">"},E=function(e,i,t,r){var
O=new
Date,o="local"!==K.p.datatype&&K.p.loadonce||"xmlstring"===K.p.datatype,n="_id_",a=K.p.xmlReader,s=[],A="local"===K.p.datatype?"local":"xml";if(o&&(K.p.data=[],K.p._index={},K.p.localReader.id=n),K.p.reccount=0,Ye.isXMLDoc(e)){i=-1!==K.p.treeANode||K.p.scroll?1<i?i:1:(ne.call(K,!1,!1),1);var
l,d,c,p,u,g,h,f,m,v,b=Ye(K),w=0,j=0,_=[],y={},x=[],F=Q(Y,"rowBox",!0,"jqgrow ui-row-"+K.p.direction),D=!0===K.p.rownumbers?1:0,q=!0===K.p.multiselect?1:0,C=!0===K.p.searchCols?1:0,I=(!0===K.p.subGrid&&(j=1,p=Ye.jgrid.getMethod("addSubGridCell")),a.repeatitems||(_=re(A)),u=!1===K.p.keyName?Ye.jgrid.isFunction(a.id)?a.id.call(K,e):a.id:K.p.keyName,a.repeatitems&&K.p.keyName&&isNaN(u)&&(u=K.p.keyIndex),g=-1===String(u).indexOf("[")?_.length?function(e,t){return Ye(u,e).text()||t}:function(e,t){return Ye(a.cell,e).eq(u).text()||t}:function(e,t){return e.getAttribute(u.replace(/[\[\]]/g,""))||t},K.p.userData={},K.p.page=J(Ye.jgrid.getXmlData(e,a.page),K.p.page),K.p.lastpage=J(Ye.jgrid.getXmlData(e,a.total),1),K.p.records=J(Ye.jgrid.getXmlData(e,a.records)),Ye.jgrid.isFunction(a.userdata)?K.p.userData=a.userdata.call(K,e)||{}:Ye.jgrid.getXmlData(e,a.userdata,!0).each(function(){K.p.userData[this.getAttribute("name")]=Ye(this).text()}),Ye.jgrid.getXmlData(e,a.root,!0)),G=(I=(I=Ye.jgrid.getXmlData(I,a.row,!0))||[]).length,S=0,N=[],k=parseInt(K.p.rowNum,10),M=K.p.scroll?Ye.jgrid.randId():1,z=Ye(K).find("tbody").first(),R=!1;if(K.p.grouping&&(R=!0===K.p.groupingView.groupCollapse,m=Ye.jgrid.getMethod("groupingPrepare")),0<G&&K.p.page<=0&&(K.p.page=1),I&&G){r&&(k*=r+1);for(var
P=Ye.jgrid.isFunction(K.p.afterInsertRow),T=D?Q(Y,"rownumBox",!1,"jqgrid-rownum"):"",H=C?Q(Y,"searchBox",!1,""):"",E=q?Q(Y,"multiBox",!1,"cbox"):"";S<G;){h=I[S],f=g(h,M+S),f=K.p.idPrefix+f,K.p.preserveSelection&&(K.p.multiselect?(v=-1!==K.p.selarrrow.indexOf(f),X=v?X+1:X):v=f===K.p.selrow);var
U=x.length;if(x.push(""),D&&x.push(te(0,S,K.p.page,K.p.rowNum,T)),q&&x.push(ee(f,D,S,v,E)),C&&x.push(ie(f,q+D,S,H)),j&&x.push(p.call(b,q+D+C,S+i)),a.repeatitems){var
B=B||oe(q+j+D+C),L=Ye.jgrid.getXmlData(h,a.cell,!0);Ye.each(B,function(e){var
t=L[this];if(!t)return!1;c=t.textContent||t.text||"",y[K.p.colModel[e+q+j+D+C].name]=c,x.push(Z(f,c,e+q+j+D+C,S+i,h,y))})}else
for(l=0;l<_.length;l++)c=Ye.jgrid.getXmlData(h,_[l]),y[K.p.colModel[l+q+j+D+C].name]=c,x.push(Z(f,c,l+q+j+D+C,S+i,h,y));if(x[U]=se(f,R,F,y,h),x.push("</tr>"),K.p.grouping&&(N.push(x),K.p.groupingView._locgr||m.call(b,y,S),x=[]),(o||!0===K.p.treeGrid&&!K.p._ald)&&(y[n]=Ye.jgrid.stripPref(K.p.idPrefix,f),K.p.data.push(y),K.p._index[y[n]]=K.p.data.length-1,-1<K.p.treeANode)&&"adjacency"===K.p.treeGridModel&&s.push(y),!1===K.p.gridview&&(z.append(x.join("")),b.triggerHandler("jqGridAfterInsertRow",[f,y,h]),P&&K.p.afterInsertRow.call(K,f,y,h),x=[]),y={},S++,++w===k)break}}if(X=K.p.multiselect&&K.p.preserveSelection&&w===X,!0===K.p.gridview&&(d=-1<K.p.treeANode?K.p.treeANode:0,K.p.grouping?o||(b.jqGrid("groupingRender",N,K.p.colModel.length,K.p.page,k),N=null):!0===K.p.treeGrid&&0<d?Ye(K.rows[d]).after(x.join("")):(z.append(x.join("")),K.grid.cols=K.rows[0].cells)),K.p.totaltime=new
Date-O,x=null,0<w&&0===K.p.records&&(K.p.records=G),!0===K.p.treeGrid){try{b.jqGrid("setTreeNode",d+1,w+d+1)}catch(e){}if(-1<K.p.treeANode&&"adjacency"===K.p.treeGridModel&&(c=K.rows[K.p.treeANode].id,1<=(c=K.p._index[c]+1))){for(K.p.data.splice(-G,G),l=0;l<G;l++)K.p.data.splice(c+l,0,s[l]);ae()}}if(K.p.reccount=w,K.p.treeANode=-1,K.p.userDataOnFooter&&b.jqGrid("footerData","set",K.p.userData,K.p.formatFooterData),K.p.userDataOnHeader&&b.jqGrid("headerData","set",K.p.userData,K.p.formatHeaderData),o&&(K.p.records=G,K.p.lastpage=Math.ceil(G/k)),t||K.updatepager(!1,!0),X&&de(!0),o){for(;w<G;){if(h=I[w],f=g(h,w+M),f=K.p.idPrefix+f,a.repeatitems){B=B||oe(q+j+D+C);var
W=Ye.jgrid.getXmlData(h,a.cell,!0);Ye.each(B,function(e){var
t=W[this];if(!t)return!1;c=t.textContent||t.text||"",y[K.p.colModel[e+q+j+D+C].name]=c})}else
for(l=0;l<_.length;l++)c=Ye.jgrid.getXmlData(h,_[l]),y[K.p.colModel[l+q+j+D+C].name]=c;y[n]=Ye.jgrid.stripPref(K.p.idPrefix,f),K.p.grouping&&m.call(b,y,w),K.p.data.push(y),K.p._index[y[n]]=K.p.data.length-1,y={},w++}K.p.grouping&&(K.p.groupingView._locgr=!0,b.jqGrid("groupingRender",N,K.p.colModel.length,K.p.page,k),N=null)}if(!0===K.p.subGrid)try{b.jqGrid("addSubGrid",q+D)}catch(e){}}},U=function(e,t,O,i){var
A=new
Date;if(e){t=-1!==K.p.treeANode||K.p.scroll?1<t?t:1:(ne.call(K,!1,!1),1),o="local"===K.p.datatype?(r=K.p.localReader,"local"):(r=K.p.jsonReader,"json");var
r,o,n,a,s,l,d,c,p,u,g,h,f,m,v="_id_",b="local"!==K.p.datatype&&K.p.loadonce||"jsonstring"===K.p.datatype,w=Ye(K),j=0,_=[],y=K.p.multiselect?1:0,x=!0===K.p.subGrid?1:0,D=!0===K.p.rownumbers?1:0,q=!0===K.p.searchCols?1:0,C=K.p.scroll&&"local"!==K.p.datatype?Ye.jgrid.randId():1,I=parseInt(K.p.rowNum,10),G=!1,S=oe(y+x+D+q),F=re(o),N={},k=[],P=[],T=Q(Y,"rowBox",!0,"jqgrow ui-row-"+K.p.direction),H=Ye.jgrid.isFunction(K.p.afterInsertRow),M=[],E=!1,U=Ye(K).find("tbody").first(),L=D?Q(Y,"rownumBox",!1,"jqgrid-rownum"):"",W=q?Q(Y,"searchBox",!1,""):"",V=y?Q(Y,"multiBox",!1,"cbox"):"";for(b&&(K.p.data=[],K.p._index={},K.p.localReader.id=v),K.p.reccount=0,K.p.page=J(Ye.jgrid.getAccessor(e,r.page),K.p.page),K.p.lastpage=J(Ye.jgrid.getAccessor(e,r.total),1),K.p.records=J(Ye.jgrid.getAccessor(e,r.records)),K.p.userData=Ye.jgrid.getAccessor(e,r.userdata)||{},x&&(l=Ye.jgrid.getMethod("addSubGridCell")),g=!1===K.p.keyName?Ye.jgrid.isFunction(r.id)?r.id.call(K,e):r.id:K.p.keyName,r.repeatitems&&K.p.keyName&&isNaN(g)&&(g=K.p.keyIndex),u=Ye.jgrid.getAccessor(e,r.root),(a=0)<(p=(u=(u=Ye.jgrid.isNull(u)&&Array.isArray(e)?e:u)||[]).length)&&K.p.page<=0&&(K.p.page=1),i&&(I*=i+1),"local"!==K.p.datatype||K.p.deselectAfterSort||(G=!0),K.p.grouping&&(E=!0===K.p.groupingView.groupCollapse,f=Ye.jgrid.getMethod("groupingPrepare"));a<p;){var
z,R=u[a],B=(void
0===(z=Ye.jgrid.getAccessor(R,g))&&void
0===(z="number"!=typeof
g||Ye.jgrid.isNull(K.p.colModel[g+y+x+D+q])?z:Ye.jgrid.getAccessor(R,K.p.colModel[g+y+x+D+q].name))&&(z=C+a,0===_.length)&&r.cell&&(B=Ye.jgrid.getAccessor(R,r.cell)||R,z=Ye.jgrid.isNull(B)||void
0===B[g]?z:B[g],B=null),z=K.p.idPrefix+z,(G||K.p.preserveSelection)&&(K.p.multiselect?(d=-1!==K.p.selarrrow.indexOf(z),X=d?X+1:X):d=z===K.p.selrow),k.length);for(k.push(""),D&&k.push(te(0,a,K.p.page,K.p.rowNum,L)),y&&k.push(ee(z,D,a,d,V)),q&&k.push(ie(z,y+D,a,W)),x&&k.push(l.call(w,y+D+q,a+t)),c=F,r.repeatitems&&(r.cell&&(R=Ye.jgrid.getAccessor(R,r.cell)||R),Array.isArray(R))&&(c=S),s=0;s<c.length;s++)n=Ye.jgrid.getAccessor(R,c[s]),N[K.p.colModel[s+y+x+D+q].name]=n,k.push(Z(z,n,s+y+x+D+q,a+t,R,N));if(k[B]=se(z,E,d?T+" "+$:T,N,R),k.push("</tr>"),K.p.grouping&&(M.push(k),K.p.groupingView._locgr||f.call(w,N,a),k=[]),(b||!0===K.p.treeGrid&&!K.p._ald)&&(N[v]=Ye.jgrid.stripPref(K.p.idPrefix,z),K.p.data.push(N),K.p._index[N[v]]=K.p.data.length-1,-1<K.p.treeANode)&&"adjacency"===K.p.treeGridModel&&P.push(N),!1===K.p.gridview&&(U.append(k.join("")),w.triggerHandler("jqGridAfterInsertRow",[z,N,R]),H&&K.p.afterInsertRow.call(K,z,N,R),k=[]),N={},a++,++j===I)break}if(X=K.p.multiselect&&(K.p.preserveSelection||G)&&j===X,!0===K.p.gridview&&(h=-1<K.p.treeANode?K.p.treeANode:0,K.p.grouping?b||(w.jqGrid("groupingRender",M,K.p.colModel.length,K.p.page,I),M=null):!0===K.p.treeGrid&&0<h?Ye(K.rows[h]).after(k.join("")):(U.append(k.join("")),K.grid.cols=K.rows[0].cells)),K.p.totaltime=new
Date-A,k=null,0<j&&0===K.p.records&&(K.p.records=p),!0===K.p.treeGrid){try{w.jqGrid("setTreeNode",h+1,j+h+1)}catch(e){}if(-1<K.p.treeANode&&"adjacency"===K.p.treeGridModel&&(n=K.rows[K.p.treeANode].id,1<=(n=K.p._index[n]+1))){for(K.p.data.splice(-p,p),a=0;a<p;a++)K.p.data.splice(n+a,0,P[a]);ae()}}if(K.p.reccount=j,K.p.treeANode=-1,K.p.userDataOnFooter&&w.jqGrid("footerData","set",K.p.userData,K.p.formatFooterData),K.p.userDataOnHeader&&w.jqGrid("headerData","set",K.p.userData,K.p.formatHeaderData),b&&(K.p.records=p,K.p.lastpage=Math.ceil(p/I)),O||K.updatepager(!1,!0),X&&de(!0),b){for(;j<p&&u[j];){if(R=u[j],void
0===(z=Ye.jgrid.getAccessor(R,g))&&void
0===(z="number"!=typeof
g||Ye.jgrid.isNull(K.p.colModel[g+y+x+D+q])?z:Ye.jgrid.getAccessor(R,K.p.colModel[g+y+x+D+q].name))&&(z=C+j,0===_.length)&&r.cell&&(m=Ye.jgrid.getAccessor(R,r.cell)||R,z=Ye.jgrid.isNull(m)||void
0===m[g]?z:m[g],m=null),R){for(z=K.p.idPrefix+z,c=F,r.repeatitems&&(r.cell&&(R=Ye.jgrid.getAccessor(R,r.cell)||R),Array.isArray(R))&&(c=S),s=0;s<c.length;s++)N[K.p.colModel[s+y+x+D+q].name]=Ye.jgrid.getAccessor(R,c[s]);N[v]=Ye.jgrid.stripPref(K.p.idPrefix,z),K.p.grouping&&f.call(w,N,j),K.p.data.push(N),K.p._index[N[v]]=K.p.data.length-1,N={}}j++}K.p.grouping&&(K.p.groupingView._locgr=!0,w.jqGrid("groupingRender",M,K.p.colModel.length,K.p.page,I),M=null)}if(!0===K.p.subGrid)try{w.jqGrid("addSubGrid",y+D+q)}catch(e){}}},L=function(e){var
t,i,r,o=K.p.multiSort?[]:"",n=[],a=!1,c={},s=[],l=[];if(Array.isArray(K.p.data)){var
d,p,u,g=!!K.p.grouping&&K.p.groupingView;if(Ye.each(K.p.colModel,function(){if("cb"===this.name||"subgrid"===this.name||"rn"===this.name||"sc"===this.name)return!0;if(i=this.sorttype||"text",u=this.index||this.name,"date"===i||"datetime"===i?(this.formatter&&"string"==typeof
this.formatter&&"date"===this.formatter?(t=this.formatoptions&&this.formatoptions.srcformat?this.formatoptions.srcformat:Ye.jgrid.getRegional(K,"formatter.date.srcformat"),r=this.formatoptions&&this.formatoptions.newformat?this.formatoptions.newformat:Ye.jgrid.getRegional(K,"formatter.date.newformat")):t=r=this.datefmt||"Y-m-d",c[u]={stype:i,srcfmt:t,newfmt:r,sfunc:this.sortfunc||null,name:this.name}):c[u]={stype:i,srcfmt:"",newfmt:"",sfunc:this.sortfunc||null,name:this.name},K.p.grouping)for(p=0,d=g.groupField.length;p<d;p++)this.name===g.groupField[p]&&(s[p]=c[u],l[p]=u);K.p.multiSort||a||u!==K.p.sortname||(o=u,a=!0)}),K.p.multiSort&&(o=I,n=G),!K.p.treeGrid||!K.p._sort){var
h={eq:function(e){return e.equals},ne:function(e){return e.notEquals},lt:function(e){return e.less},le:function(e){return e.lessOrEquals},gt:function(e){return e.greater},ge:function(e){return e.greaterOrEquals},cn:function(e){return e.contains},nc:function(e,t){return("OR"===t?e.orNot():e.andNot()).contains},bw:function(e){return e.startsWith},bn:function(e,t){return("OR"===t?e.orNot():e.andNot()).startsWith},en:function(e,t){return("OR"===t?e.orNot():e.andNot()).endsWith},ew:function(e){return e.endsWith},ni:function(e,t){return("OR"===t?e.orNot():e.andNot()).inData},in:function(e){return e.inData},nu:function(e){return e.isNull},nn:function(e,t){return("OR"===t?e.orNot():e.andNot()).isNull}},f=Ye.jgrid.from.call(K,K.p.data);if(K.p.ignoreCase&&(f=f.ignoreCase()),!0===K.p.search){var
m=K.p.postData.filters;if(m)!function
e(t){var
i,r,o,n,a,s,l,d=0;if(!Ye.jgrid.isNull(t.groups)){for((r=t.groups.length&&"OR"===t.groupOp.toString().toUpperCase())&&f.orBegin(),i=0;i<t.groups.length;i++){0<d&&r&&f.or();try{e(t.groups[i])}catch(e){alert(e)}d++}r&&f.orEnd()}if(!Ye.jgrid.isNull(t.rules))try{for((l=t.rules.length&&"OR"===t.groupOp.toString().toUpperCase())&&f.orBegin(),i=0;i<t.rules.length;i++){if(n=t.rules[i],o=t.groupOp.toString().toUpperCase(),h[n.op]&&n.field){0<d&&o&&"OR"===o&&(f=f.or()),s=n.field,K.p.useNameForSearch&&c.hasOwnProperty(n.field)&&(s=c[n.field].name);try{"date"===(a=c[n.field]).stype&&"string"==typeof
a.srcfmt&&"string"==typeof
a.newfmt&&(n.data=Ye.jgrid.parseDate.call(K,a.newfmt,n.data,a.srcfmt)),f=h[n.op](f,o)(s,n.data,a)}catch(e){}}else
void
0!==K.p.customFilterDef&&void
0!==K.p.customFilterDef[n.op]&&Ye.jgrid.isFunction(K.p.customFilterDef[n.op].action)&&(f=f.user.call(K,n.op,n.field,n.data));d++}l&&f.orEnd()}catch(e){alert(e)}}(m="string"==typeof
m?Ye.jgrid.parse(m):m);else
try{"date"===(j=c[K.p.postData.searchField]).stype&&j.srcfmt&&j.newfmt&&j.srcfmt!==j.newfmt&&(K.p.postData.searchString=Ye.jgrid.parseDate.call(K,j.newfmt,K.p.postData.searchString,j.srcfmt)),h[K.p.postData.searchOper]?f=h[K.p.postData.searchOper](f)(K.p.postData.searchField,K.p.postData.searchString,c[K.p.postData.searchField]):void
0!==K.p.customFilterDef&&void
0!==K.p.customFilterDef[K.p.postData.searchOper]&&Ye.jgrid.isFunction(K.p.customFilterDef[K.p.postData.searchOper].action)&&(f=f.user.call(K,K.p.postData.searchOper,K.p.postData.searchField,K.p.postData.searchString))}catch(e){}}if(K.p.treeGrid&&"nested"===K.p.treeGridModel&&f.orderBy(K.p.treeReader.left_field,"asc","integer","",null),K.p.treeGrid&&"adjacency"===K.p.treeGridModel&&(d=0,o=null),K.p.grouping)for(p=0;p<d;p++)f.orderBy(l[p],g.groupOrder[p],s[p].stype,s[p].srcfmt);K.p.multiSort?Ye.each(o,function(e){f.orderBy(this,n[e],c[this].stype,c[this].srcfmt,c[this].sfunc)}):o&&K.p.sortorder&&a&&("DESC"===K.p.sortorder.toUpperCase()?f.orderBy(K.p.sortname,"d",c[o].stype,c[o].srcfmt,c[o].sfunc):f.orderBy(K.p.sortname,"a",c[o].stype,c[o].srcfmt,c[o].sfunc));var
v=f.select(),b=parseInt(K.p.rowNum,10),w=v.length,m=parseInt(K.p.page,10),j=Math.ceil(w/b),_={};if((K.p.search||K.p.resetsearch)&&K.p.grouping&&K.p.groupingView._locgr){K.p.groupingView.groups=[];var
y,x,D,q=Ye.jgrid.getMethod("groupingPrepare");if(K.p.footerrow&&K.p.userDataOnFooter){for(x
in
K.p.userData)K.p.userData.hasOwnProperty(x)&&(K.p.userData[x]=0);D=!0}for(y=0;y<w;y++){if(D)for(x
in
K.p.userData)K.p.userData.hasOwnProperty(x)&&(K.p.userData[x]+=parseFloat(v[y][x]||0));q.call(Ye(K),v[y],y,b)}}return e?v:(v=K.p.treeGrid&&K.p.search?Ye(K).jqGrid("searchTree",v):v.slice((m-1)*b,m*b),c=f=null,_[K.p.localReader.total]=j,_[K.p.localReader.page]=m,_[K.p.localReader.records]=w,_[K.p.localReader.root]=v,_[K.p.localReader.userdata]=K.p.userData,v=null,_)}Ye(K).jqGrid("SortTree",o,K.p.sortorder,c[o].stype||"text",c[o].srcfmt||"")}},W=function(){K.grid.hDiv.loading=!0,K.p.hiddengrid||Ye(K).jqGrid("progressBar",{method:"show",loadtype:K.p.loadui,htmlcontent:Ye.jgrid.getRegional(K,"defaults.loadtext",K.p.loadtext)})},f=function(){K.grid.hDiv.loading=!1,Ye(K).jqGrid("progressBar",{method:"hide",loadtype:K.p.loadui})},V=function(e,t,i){var
r=void
0===(r=Ye(K).triggerHandler("jqGridBeforeProcessing",[e,t,i]))||"boolean"!=typeof
r||r;return r=Ye.jgrid.isFunction(K.p.beforeProcessing)&&!1===K.p.beforeProcessing.call(K,e,t,i)?!1:r},le=function(e,t){Ye(K).triggerHandler("jqGridLoadComplete",[e]),t&&K.p.loadComplete.call(K,e),Ye(K).triggerHandler("jqGridAfterLoadComplete",[e]),K.p.datatype="local",K.p.datastr=null,f()},_=function(r){if(!K.grid.hDiv.loading){var
o,n=K.p.scroll&&!1===r,e={},t=K.p.prmNames,i=(X=0,K.p.page<=0&&(K.p.page=Math.min(1,K.p.lastpage)),Ye.jgrid.isNull(t.search,!0)||(e[t.search]=K.p.search),Ye.jgrid.isNull(t.nd,!0)||(e[t.nd]=(new
Date).getTime()),Ye.jgrid.isNull(t.rows,!0)||(e[t.rows]=K.p.rowNum),Ye.jgrid.isNull(t.page,!0)||(e[t.page]=K.p.page),Ye.jgrid.isNull(t.sort,!0)||(e[t.sort]=K.p.sortname),Ye.jgrid.isNull(t.order,!0)||(e[t.order]=K.p.sortorder),Ye.jgrid.isNull(K.p.rowTotal,!0)&&!Ye.jgrid.isNull(t.totalrows,!0)&&(e[t.totalrows]=K.p.rowTotal),Ye.jgrid.isFunction(K.p.loadComplete)),a=i?K.p.loadComplete:null,s=0;if(1<(r=r||1)?Ye.jgrid.isNull(t.npage,!0)?a=function(e){K.p.page++,K.grid.hDiv.loading=!1,i&&K.p.loadComplete.call(K,e),_(r-1)}:(e[t.npage]=r,s=r-1,r=1):Ye.jgrid.isNull(t.npage,!0)||delete
K.p.postData[t.npage],K.p.grouping){Ye(K).jqGrid("groupingSetup");for(var
l=K.p.groupingView,d=[],c=0;c<l.groupField.length;c++){var
p=l.groupField[c];Ye.each(K.p.colModel,function(e,t){t.name===p&&t.index&&(p=t.index)}),d.push(p+" "+l.groupOrder[c])}g=d.join(),""!==Ye.jgrid.trim(e[t.sort])?e[t.sort]=""!==g?g+" ,"+e[t.sort]:e[t.sort]:(e[t.sort]=g,e[t.order]=""),"local"!==K.p.datatype||l._locgr||(K.p.datatype="jsonstring",K.p.datastr=K.p.data)}Ye.extend(K.p.postData,e);var
u=K.p.scroll?K.rows.length-1:1;if(Ye.jgrid.isFunction(K.p.datatype))K.p.datatype.call(K,K.p.postData,"load_"+K.p.id,u,r,s);else{var
g=Ye(K).triggerHandler("jqGridBeforeRequest");if(!1!==g&&"stop"!==g&&(!Ye.jgrid.isFunction(K.p.beforeRequest)||!1!==(g=K.p.beforeRequest.call(K))&&"stop"!==g)){switch(Ye.jgrid.isFunction(K.treeGrid_beforeRequest)&&K.treeGrid_beforeRequest.call(K),o=K.p.datatype.toLowerCase()){case"json":case"jsonp":case"xml":case"script":Ye.ajax(Ye.extend({url:K.p.url,type:K.p.mtype,dataType:o,data:Ye.jgrid.isFunction(K.p.serializeGridData)?K.p.serializeGridData.call(K,K.p.postData):K.p.postData,success:function(e,t,i){V(e,t,i)?(("xml"===o?E:U)(e,u,1<r,s),Ye(K).triggerHandler("jqGridLoadComplete",[e]),a&&a.call(K,e),Ye(K).triggerHandler("jqGridAfterLoadComplete",[e]),n&&K.grid.populateVisible(),K.p.treeGrid_bigData?K.p.loadonce&&(K.p.datatype="local"):(K.p.loadonce||K.p.treeGrid)&&(K.p.datatype="local"),e=null,1===r&&f(),Ye.jgrid.isFunction(K.treeGrid_afterLoadComplete)&&K.treeGrid_afterLoadComplete.call(K)):f()},error:function(e,t,i){Ye(K).triggerHandler("jqGridLoadError",[e,t,i]),Ye.jgrid.isFunction(K.p.loadError)&&K.p.loadError.call(K,e,t,i),1===r&&f()},beforeSend:function(e,t){var
i=!0,i=Ye(K).triggerHandler("jqGridLoadBeforeSend",[e,t]);if(!1===(i=void
0===(i=Ye.jgrid.isFunction(K.p.loadBeforeSend)?K.p.loadBeforeSend.call(K,e,t):i)?!0:i))return!1;W()}},Ye.jgrid.ajaxOptions,K.p.ajaxGridOptions));break;case"xmlstring":if(W(),h="string"!=typeof
K.p.datastr?K.p.datastr:Ye.parseXML(K.p.datastr),!V(h,200,null))return void
f();E(h),le(h,i);break;case"jsonstring":if(W(),h="string"==typeof
K.p.datastr?Ye.jgrid.parse(K.p.datastr):K.p.datastr,!V(h,200,null))return void
f();U(h),K.p.grouping&&l._locgr&&(K.p.data=h),le(h,i);break;case"local":case"clientside":W(),K.p.datatype="local",K.p._ald=!0;var
h=L(!1);if(!V(h,200,null))return void
f();U(h,u,1<r,s),Ye(K).triggerHandler("jqGridLoadComplete",[h]),a&&a.call(K,h),Ye(K).triggerHandler("jqGridAfterLoadComplete",[h]),n&&K.grid.populateVisible(),f(),K.p._ald=!1}K.p._sort=!1}}}},de=function(e){Ye("#cb_"+Ye.jgrid.jqID(K.p.id),K.grid.hDiv)[K.p.useProp?"prop":"attr"]("checked",e),(K.p.frozenColumns?K.p.id+"_frozen":"")&&Ye("#cb_"+Ye.jgrid.jqID(K.p.id),K.grid.fhDiv)[K.p.useProp?"prop":"attr"]("checked",e)},ce=function(e,s){function
l(e,t){var
i=Ye(K).triggerHandler("jqGridPaging",[e,t]);return"stop"!==i&&"stop"!==(i=Ye.jgrid.isFunction(K.p.onPaging)?K.p.onPaging.call(K,e,t):i)&&(K.p.selrow=null,K.p.multiselect&&(K.p.preserveSelection||(K.p.selarrrow=[]),de(!1)),K.p.savedRow=[])}var
t,i,r,o,n,a,d,c,p,u="<td class='ui-pg-button "+b+"'><span class='ui-separator'></span></td>",g="",h="<table class='ui-pg-table ui-common-table ui-paging-pager'><tbody><tr>",f="";if(s+="_"+e,t="pg_"+e,c=e+"_left",p=e+"_center",n=e+"_right",Ye("#"+Ye.jgrid.jqID(e)).append("<div id='"+t+"' class='ui-pager-control' role='group'><table "+Q(Y,"pagerTable",!1,"ui-pg-table ui-common-table ui-pager-table")+"><tbody><tr><td id='"+c+"' align='left'></td><td id='"+p+"' align='center' style='white-space:pre;'></td><td id='"+n+"' align='right'></td></tr></tbody></table></div>").attr("dir",v),0<K.p.rowList.length){var
m,f='<td dir="'+v+'">';for(f+="<select "+Q(Y,"pgSelectBox",!1,"ui-pg-selbox")+' size="1" role="listbox" title="'+(Ye.jgrid.getRegional(K,"defaults.pgrecs",K.p.pgrecs)||"")+'">',i=0;i<K.p.rowList.length;i++)1===(m=K.p.rowList[i].toString().split(":")).length&&(m[1]=m[0]),f+='<option role="option" value="'+m[0]+'"'+(J(K.p.rowNum,0)===J(m[0],0)?' selected="selected"':"")+">"+m[1]+"</option>";f+="</select></td>"}"rtl"===v&&(h+=f,Ye("#"+n).attr("align","left")),!0===K.p.pginput&&(g="<td id='input"+s+"' dir='"+v+"'>"+Ye.jgrid.template(Ye.jgrid.getRegional(K,"defaults.pgtext",K.p.pgtext)||"","<input "+Q(Y,"pgInput",!1,"ui-pg-input")+" type='text' size='2' maxlength='7' value='0' role='textbox'/>","<span id='sp_1_"+Ye.jgrid.jqID(e)+"'></span>")+"</td>"),!0===K.p.pgbuttons?(o=["first"+s,"prev"+s,"next"+s,"last"+s],c=Q(Y,"pgButtonBox",!0,"ui-pg-button"),p=[Ye.jgrid.getRegional(K,"defaults.pgfirst",K.p.pgfirst)||"",Ye.jgrid.getRegional(K,"defaults.pgprev",K.p.pgprev)||"",Ye.jgrid.getRegional(K,"defaults.pgnext",K.p.pgnext)||"",Ye.jgrid.getRegional(K,"defaults.pglast",K.p.pglast)||""],"rtl"===v&&(o.reverse(),p.reverse()),n="<td id='"+o[0]+"' class='"+c+"' title='"+p[0]+"'><span "+Q(Y,"icon_first",!1,q)+"></span></td>",a="<td id='"+o[1]+"' class='"+c+"'  title='"+p[1]+"'><span "+Q(Y,"icon_prev",!1,q)+"></span></td>",d="<td id='"+o[2]+"' class='"+c+"' title='"+p[2]+"'><span "+Q(Y,"icon_next",!1,q)+"></span></td>",c="<td id='"+o[3]+"' class='"+c+"' title='"+p[3]+"'><span "+Q(Y,"icon_end",!1,q)+"></span></td>",p=""!==g?u+g+u:"",h+="ltr"===v?n+a+p+d+c:c+d+p+a+n):""!==g&&(h+=g),"ltr"===v&&(h+=f),h+="</tr></tbody></table>",e=Ye.jgrid.jqID(e),t=Ye.jgrid.jqID(t),!0===K.p.viewrecords&&Ye("td#"+e+"_"+K.p.recordpos,"#"+t).append("<div dir='"+v+"' style='text-align:"+K.p.recordpos+"' class='ui-paging-info'></div>"),Ye("td#"+e+"_"+K.p.pagerpos,"#"+t).append(h),u=Ye("#gbox_"+Ye.jgrid.jqID(K.p.id)).css("font-size")||"11px",Ye("#gbox_"+Ye.jgrid.jqID(K.p.id)).append("<div id='testpg' "+Q(Y,"entrieBox",!1,"ui-jqgrid")+" style='font-size:"+u+";visibility:hidden;' ></div>"),c=Ye(h).clone().appendTo("#testpg").width(),Ye("#testpg").remove(),0<c&&(""!==g&&(c+=50),r=c>Ye("td#"+e+"_"+K.p.pagerpos,"#"+t).innerWidth(),Ye("td#"+e+"_"+K.p.pagerpos,"#"+t).width(c)),K.p._nvtd=[],K.p._nvtd[0]=c?Math.floor((K.p.width-c)/2):Math.floor(K.p.width/3),K.p._nvtd[1]=0,h=null,Ye(".ui-pg-selbox","#"+t).on("change",function(){return l("records",this)&&(K.p.page=Math.round(K.p.rowNum*(K.p.page-1)/this.value-.5)+1,K.p.rowNum=this.value,K.p.pager&&Ye(".ui-pg-selbox",K.p.pager).val(this.value),K.p.toppager&&Ye(".ui-pg-selbox",K.p.toppager).val(this.value),_()),!1}),!0===K.p.pgbuttons&&(Ye(".ui-pg-button","#"+t).hover(function(){Ye(this).hasClass(b)?this.style.cursor="default":(Ye(this).addClass(D),this.style.cursor="pointer")},function(){Ye(this).hasClass(b)||(Ye(this).removeClass(D),this.style.cursor="default")}),Ye("#first"+Ye.jgrid.jqID(s)+", #prev"+Ye.jgrid.jqID(s)+", #next"+Ye.jgrid.jqID(s)+", #last"+Ye.jgrid.jqID(s)).click(function(){var
e,t,i,r,o,n,a;return Ye(this).hasClass(b)||(e=J(K.p.page,1),a=n=o=r=!(i=!1),0===(t=J(K.p.lastpage,1))||1===t?a=n=o=r=!1:1<t&&1<=e?1===e?o=r=!1:e===t&&(a=n=!1):1<t&&0===e&&(a=n=!1,e=t-1),l(this.id.split("_")[0],this)&&(this.id==="first"+s&&r&&(K.p.page=1,i=!0),this.id==="prev"+s&&o&&(K.p.page=e-1,i=!0),this.id==="next"+s&&n&&(K.p.page=e+1,i=!0),this.id==="last"+s&&a&&(K.p.page=t,i=!0),i&&_(),Ye.jgrid.setSelNavIndex(K,this))),!1})),!0===K.p.pginput&&Ye("#"+t).on("keypress","input.ui-pg-input",function(e){return 13===(e.charCode||e.keyCode||0)?(l("user",this)&&(Ye(this).val(J(Ye(this).val(),1)),K.p.page=0<Ye(this).val()?Ye(this).val():K.p.page,_()),!1):this}),r&&K.p.responsive&&!K.p.forcePgButtons&&(Ye("#"+o[0]+",#"+o[3]+",#input"+Ye.jgrid.jqID(s)).hide(),Ye(".ui-paging-info","td#"+e+"_"+K.p.recordpos).hide(),Ye(".ui-pg-selbox","td#"+e+"_"+K.p.pagerpos).hide())},pe=function(e,t,i){var
r=K.p.colModel,o=[],n="",r=(o.push(K.grid.headers[e].el),K.p.frozenColumns&&o.push(t),Ye("span.ui-grid-ico-sort",o).addClass(b),Ye(o).attr({"aria-selected":"false","aria-sort":"none"}),t=r[e].index||r[e].name,void
0===i?r[e].lso?"asc"===r[e].lso?(r[e].lso+="-desc",n="desc"):"desc"===r[e].lso?(r[e].lso+="-asc",n="asc"):"asc-desc"!==r[e].lso&&"desc-asc"!==r[e].lso||(r[e].lso=""):r[e].lso=n=r[e].firstsortorder||"asc":r[e].lso=n=i,n?(Ye("span.s-ico",o).show(),Ye("span.ui-icon-"+n,o).removeClass(b),Ye(o).attr({"aria-selected":"true","aria-sort":n+"ending"})):K.p.viewsortcols[0]||Ye("span.s-ico",o).hide(),I.indexOf(t));-1===r?(I.push(t),G.push(n)):n?G[r]=n:(G.splice(r,1),I.splice(r,1)),K.p.sortorder="",K.p.sortname="";for(var
a=0,s=I.length;a<s;a++)0<a&&(K.p.sortname+=", "),K.p.sortname+=I[a],a!==s-1&&(K.p.sortname+=" "+G[a]);K.p.sortorder=G[s-1]},ue=function(e,t,i,r,o){if(K.p.colModel[t].sortable&&!(0<K.p.savedRow.length)){if(i||(K.p.lastsort===t&&""!==K.p.sortname?"asc"===K.p.sortorder?K.p.sortorder="desc":"desc"===K.p.sortorder&&(K.p.sortorder="asc"):K.p.sortorder=K.p.colModel[t].firstsortorder||"asc",K.p.page=1),K.p.multiSort)pe(t,o,r);else{if(r){if(K.p.lastsort===t&&K.p.sortorder===r&&!i)return;K.p.sortorder=r}var
i=K.grid.headers[K.p.lastsort]?K.grid.headers[K.p.lastsort].el:null,r=K.grid.headers[t].el,o=K.p.frozenColumns?o:null,n="single"===K.p.viewsortcols[1],a=Ye(i).find("span.ui-grid-ico-sort");a.addClass(b),n&&Ye(a).css("display","none"),Ye(i).attr({"aria-selected":"false","aria-sort":"none"}),K.p.frozenColumns&&((a=K.grid.fhDiv.find("span.ui-grid-ico-sort")).addClass(b),n&&a.css("display","none"),K.grid.fhDiv.find("th").attr({"aria-selected":"false","aria-sort":"none"})),(a=Ye(r).find("span.ui-icon-"+K.p.sortorder)).removeClass(b),n&&a.css("display",""),Ye(r).attr({"aria-selected":"true","aria-sort":K.p.sortorder+"ending"}),K.p.frozenColumns&&((a=Ye(o).find("span.ui-icon-"+K.p.sortorder)).removeClass(b),n&&a.css("display",""),Ye(o).attr({"aria-selected":"true","aria-sort":K.p.sortorder+"ending"})),K.p.viewsortcols[0]||(K.p.lastsort!==t?(K.p.frozenColumns&&K.grid.fhDiv.find("span.s-ico").hide(),Ye("span.s-ico",i).hide(),Ye("span.s-ico",r).show(),o&&Ye("span.s-ico",o).show()):""===K.p.sortname&&Ye("span.s-ico",r).show()),e=e.substring(5+K.p.id.length+1),K.p.sortname=K.p.colModel[t].index||e}("stop"===Ye(K).triggerHandler("jqGridSortCol",[K.p.sortname,t,K.p.sortorder])||Ye.jgrid.isFunction(K.p.onSortCol)&&"stop"===K.p.onSortCol.call(K,K.p.sortname,t,K.p.sortorder)||(de(!1),"local"===K.p.datatype?K.p.deselectAfterSort&&!K.p.preserveSelection&&Ye(K).jqGrid("resetSelection"):(K.p.selrow=null,K.p.multiselect&&!K.p.preserveSelection&&(K.p.selarrrow=[]),K.p.savedRow=[]),K.p.scroll&&(n=K.grid.bDiv.scrollLeft,ne.call(K,!0,!1),K.grid.hDiv.scrollLeft=n),K.p.subGrid&&"local"===K.p.datatype&&Ye("td.sgexpanded","#"+Ye.jgrid.jqID(K.p.id)).each(function(){Ye(this).trigger("click")}),K.p._sort=!0,_(),K.p.lastsort=t,K.p.sortname!==e&&t))&&(K.p.lastsort=t)}},ge=function(e){for(var
t=K.grid.headers,i=Ye.jgrid.getCellIndex(e),r=0;r<t.length;r++)if(e===t[r].el){i=r;break}return i},he=function(e,t,i,r){var
o,n=K.p.colModel,a=n.length,s=[],l=!0,d=[],c=Ye.extend([],K.p.colNames),p=Ye.jgrid.getRegional(K,"colmenu"),u=[],g='<ul id="col_menu" class="ui-search-menu  ui-col-menu modal-content" role="menu" tabindex="0" style="left:'+t+'px;">';if(r.columns_selectAll&&(g+='<li class="ui-menu-item disabled" role="presentation" draggable="false"><a class="g-menu-item" tabindex="0" role="menuitem" ><table class="ui-common-table" ><tr><td class="menu_icon" title="'+p.reorder+'"><span class="'+q+" "+C.icon_move+' notclick" style="visibility:hidden"></span></td><td class="menu_icon"><input id="chk_all" class="'+C.input_checkbox+'" type="checkbox" name="check_all"></td><td class="menu_text">Check/Uncheck</td></tr></table></a></li>'),K.p.colSpanHeader.length)for(var
h=0;h<K.p.colSpanHeader.length;h++){var
f,m=K.p.colSpanHeader[h];0<=(f=Ye.jgrid.getElemByAttrVal(n,"name",m.startColumnName,!0))&&(u.push(f),c[f]=m.titleText)}if(Ye(K).jqGrid("isGroupHeaderOn"))for(var
t=K.p.groupHeader.length,v=K.p.groupHeader[t-1],b=0;b<c.length;b++)if(0<=(f=Ye.jgrid.inColumnHeader(n[b].name,v.groupHeaders))){c[b]=v.groupHeaders[f].titleText+"::"+c[b];for(var
w=1;w<=v.groupHeaders[f].numberOfColumns-1;w++)c[b+w]=v.groupHeaders[f].titleText+"::"+c[b+w];b=b+v.groupHeaders[f].numberOfColumns-1}for(o=0;o<a;o++){var
j,_=n[o].hidden?"":"checked",y=n[o].name,x=c[o];g+="<li "+(j="cb"===y||"subgrid"===y||"rn"===y||"sc"===y||n[o].hidedlg?"style='display:none'":"")+' class="ui-menu-item" role="presentation" draggable="true"><a class="g-menu-item" tabindex="0" role="menuitem" ><table class="ui-common-table" ><tr><td class="menu_icon" title="'+p.reorder+'"><span class="'+q+" "+C.icon_move+' notclick"></span></td><td class="menu_icon"><input class="'+C.input_checkbox+' chk_selected" type="checkbox" name="'+y+'" '+_+'></td><td class="menu_text">'+x+"</td></tr></table></a></li>",s.push(o),j||d.push(y),l&&!_&&(l=!1)}g+="</ul>",Ye(i).append(g),Ye("#col_menu").addClass("ui-menu "+C.menu_widget),Ye("#chk_all","#col_menu").prop("checked",l),Ye.jgrid.isElementInViewport(Ye("#col_menu")[0])||Ye("#col_menu").css("left",-parseInt(Ye("#column_menu").innerWidth(),10)+"px"),Ye.fn.html5sortable()&&Ye("#col_menu").html5sortable({handle:"span",items:":not(.disabled)",forcePlaceholderSize:!0}).on("sortupdate",function(e,t){for(s.splice(t.startindex,1),s.splice(t.endindex,0,t.startindex),Ye(K).jqGrid("destroyFrozenColumns"),Ye(K).jqGrid("remapColumns",s,!0),Ye(K).triggerHandler("jqGridColMenuColumnDone",[s,null,null]),Ye.jgrid.isFunction(K.p.colMenuColumnDone)&&K.p.colMenuColumnDone.call(K,s,null,null),Ye(K).jqGrid("setFrozenColumns"),o=0;o<a;o++)s[o]=o}),Ye("#col_menu > li > a").on("click",function(e){var
t;Ye(e.target).hasClass("notclick")||(Ye(e.target).is(":input")?t=Ye(e.target).is(":checked"):(t=!Ye("input",this).is(":checked"),Ye("input",this).prop("checked",t)),"check_all"===(e=Ye("input",this).attr("name"))?t?(Ye("input","#col_menu").prop("checked",!0),Ye(K).jqGrid("showCol",d)):(Ye("input","#col_menu").prop("checked",!1),Ye(K).jqGrid("hideCol",d)):(Ye(K).triggerHandler("jqGridColMenuColumnDone",[s,e,t]),Ye.jgrid.isFunction(K.p.colMenuColumnDone)&&K.p.colMenuColumnDone.call(K,s,e,t),t?(Ye(K).jqGrid("showCol",e),Ye(this).parent().attr("draggable","true")):(Ye(K).jqGrid("hideCol",e),Ye(this).parent().attr("draggable","false")),r.columns_selectAll&&Ye("#chk_all","#col_menu").prop("checked",Ye(".chk_selected:checked","#col_menu").length===Ye(".chk_selected","#col_menu").length),Ye("#column_menu").remove()))}).hover(function(){Ye(this).addClass(D)},function(){Ye(this).removeClass(D)})},fe=function(e,t,i,r){var
o,n,a,s,l,d,c=K.p.colModel[e],p="",e="",u="",g="",h="",f="",m=Ye.jgrid.getRegional(K,"search"),v=Ye.jgrid.styleUI[K.p.styleUI||"jQueryUI"].common,b=Ye.jgrid.styleUI[w.styleUI||"jQueryUI"].modal;c&&((a=!(!K.p.colFilters||!K.p.colFilters[c.name])&&K.p.colFilters[c.name])&&!Ye.isEmptyObject(a)&&(p=a.oper1,e=a.value1,u=a.rule,g=a.oper2,h=a.value2),c.searchoptions||(c.searchoptions={}),n=c.searchoptions.sopt||(-1!==Ye.inArray(c.sorttype,["text","string","blob"])?["eq","ne","bw","bn","ew","en","cn","nc","nu","nn","in","ni"]:["eq","ne","lt","le","gt","ge","nu","nn","in","ni"]),a=c.searchoptions.groupOps||m.groupOps,s=Ye("<form></form>"),l="<a id='bs_close' aria-label='Close'><span class='"+q+" "+b.icon_close+"'></span></a>",l=(l+="<div>"+Ye.jgrid.getRegional(K,"colmenu.searchTitle")+"</div>")+'<div><select size="1" id="oper1" class="'+C.filter_select+'">',Ye.each(m.odata,function(e,t){o=t.oper===p?'selected="selected"':"",-1!==Ye.inArray(t.oper,n)&&(f+='<option value="'+t.oper+'" '+o+">"+t.text+"</option>")}),l=l+f+"</select></div>",s.append(l),d="",c.searchoptions.defaultValue&&(d=Ye.jgrid.isFunction(c.searchoptions.defaultValue)?c.searchoptions.defaultValue.call(K):c.searchoptions.defaultValue),e&&(d=e),b=Ye.extend(c.searchoptions,{name:c.index||c.name,id:"sval1_"+K.p.idPrefix+c.name,oper:"search"}),e=Ye.jgrid.createEl.call(K,c.stype,b,d,!1,Ye.extend({},Ye.jgrid.ajaxOptions,K.p.ajaxSelectOptions||{})),Ye(e).addClass(C.filter_input),l=Ye("<div></div>").append(e),s.append(l),l='<div><select size="1" id="operand" class="'+C.filter_select+'">',Ye.each(a,function(e,t){o=t.op===u?'selected="selected"':"",l+="<option value='"+t.op+"' "+o+">"+t.text+"</option>"}),l+="</select></div>",s.append(l),f="",Ye.each(m.odata,function(e,t){o=t.oper===g?'selected="selected"':"",-1!==Ye.inArray(t.oper,n)&&(f+='<option value="'+t.oper+'" '+o+">"+t.text+"</option>")}),l='<div><select size="1" id="oper2" class="'+C.filter_select+'">'+f+"</select></div>",s.append(l),d=h||"",b=Ye.extend(c.searchoptions,{name:c.index||c.name,id:"sval2_"+K.p.idPrefix+c.name,oper:"search"}),e=Ye.jgrid.createEl.call(K,c.stype,b,d,!1,Ye.extend({},Ye.jgrid.ajaxOptions,K.p.ajaxSelectOptions||{})),Ye(e).addClass(C.filter_input),l=Ye("<div></div>").append(e),s.append(l),l="<div>",l=(l+="<div class='search_buttons'><a tabindex='0' id='bs_reset' class='fm-button "+v.button+" ui-reset'>"+m.Reset+"</a></div>")+"<div class='search_buttons'><a tabindex='0' id='bs_search' class='fm-button "+v.button+" ui-search'>"+m.Find+"</a></div></div>",s.append(l),s=Ye('<li class="ui-menu-item" role="presentation"></li>').append(s),s=Ye('<ul id="search_menu" class="ui-search-menu modal-content" role="menu" tabindex="0" style="left:'+i+'px;"></ul>').append(s),Ye(r).append(s),Ye("#search_menu").addClass("ui-menu "+C.menu_widget),Ye.jgrid.isElementInViewport(Ye("#search_menu")[0])||Ye("#search_menu").css("left",-parseInt(Ye("#column_menu").innerWidth(),10)+"px"),Ye("#bs_reset, #bs_search","#search_menu","#bs_close").hover(function(){Ye(this).addClass(D)},function(){Ye(this).removeClass(D)}),Ye("#bs_reset",s).on("click",function(e){K.p.colFilters[c.name]={},!0===K.p.mergeSearch&&K.p.searchModules.hasOwnProperty("colMenuSearch")&&!1!==K.p.searchModules.colMenuSearch?(K.p.searchModules.colMenuSearch=me(),Ye.extend(K.p.postData,{filters:Ye.jgrid.splitSearch(K.p.searchModules)}),K.p.search=!0):(K.p.postData.filters=me(),K.p.search=!1,K.p.resetsearch=!0),d="",c.searchoptions.defaultValue&&(d=Ye.jgrid.isFunction(c.searchoptions.defaultValue)?c.searchoptions.defaultValue.call(K):c.searchoptions.defaultValue),Ye("#sval1_"+K.p.idPrefix+c.name,"#search_menu").val(d),Ye("#sval2_"+K.p.idPrefix+c.name,"#search_menu").val(""),Ye.jgrid.isFunction(K.p.colMenuBeforeProcess)&&K.p.colMenuBeforeProcess.call(K,{module:"filtering",action:"reset",column:c.name}),Ye(K).trigger("reloadGrid")}),Ye("#bs_search",s).on("click",function(e){K.p.colFilters[c.name]={oper1:Ye("#oper1","#search_menu").val(),value1:Ye("#sval1_"+K.p.idPrefix+c.name,"#search_menu").val(),rule:Ye("#operand","#search_menu").val(),oper2:Ye("#oper2","#search_menu").val(),value2:Ye("#sval2_"+K.p.idPrefix+c.name,"#search_menu").val()},!0===K.p.mergeSearch&&K.p.searchModules.hasOwnProperty("colMenuSearch")&&!1!==K.p.searchModules.colMenuSearch?(K.p.searchModules.colMenuSearch=me(),Ye.extend(K.p.postData,{filters:Ye.jgrid.splitSearch(K.p.searchModules)})):K.p.postData.filters=me(),K.p.search=!0,Ye.jgrid.isFunction(K.p.colMenuBeforeProcess)&&K.p.colMenuBeforeProcess.call(K,{module:"filtering",action:"search",column:c.name}),Ye(K).trigger("reloadGrid"),Ye("#column_menu").remove()}),Ye("#bs_close",s).on("click",function(){Ye("#column_menu").remove()}))},me=function(){var
e,t="",i=0;for(e
in
K.p.colFilters)if(K.p.colFilters.hasOwnProperty(e)){var
r=K.p.colFilters[e];if(!Ye.isEmptyObject(r)){if(""===r.value1&&""===r.value2)break;0<i&&(t+=","),t=(t=t+('{"groupOp":"'+r.rule+'","rules":[')+('{"field":"'+e+'",'))+('"op":"'+r.oper1+'",'),r.value1+="",t+='"data":"'+r.value1.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"}',r.value2&&(t=(t+=',{"field":"'+e+'",')+'"op":"'+r.oper2+'",',r.value2+="",t+='"data":"'+r.value2.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"}'),t+="]",i++}}return t+="}",t=0===i?"":t},ve=function(e,t){var
e=K.p.colModel[e],i=K.p.groupingView;-1!==t?i.groupField.splice(t,1):i.groupField.push(e.name),Ye.jgrid.isFunction(K.p.colMenuBeforeProcess)&&K.p.colMenuBeforeProcess.call(K,{module:"grouping",action:-1!==t?"ungroup":"group",column:e.name}),Ye(K).jqGrid("groupingGroupBy",i.groupField),K.p.frozenColumns&&(Ye(K).jqGrid("destroyFrozenColumns"),Ye(K).jqGrid("setFrozenColumns"))},be=function(e,t){for(var
i=[],r=K.p.colModel.length,o=-1,n=K.p.colModel,a=0;a<r;a++)n[a].frozen&&(o=a),i.push(a);i.splice(e,1),i.splice(o+(t?1:0),0,e),n[e].frozen=t,Ye.jgrid.isFunction(K.p.colMenuBeforeProcess)&&K.p.colMenuBeforeProcess.call(K,{module:"freeze",action:t?"freeze":"unfreeze",column:n[e].name}),Ye(K).jqGrid("destroyFrozenColumns"),Ye(K).jqGrid("remapColumns",i,!0),Ye(K).jqGrid("setFrozenColumns")};for((K.p.colMenu||K.p.menubar)&&Ye("body").on("click",function(e){if(!Ye(e.target).closest("#column_menu").length)try{Ye("#column_menu").remove()}catch(e){}if(!Ye(e.target).closest(".ui-jqgrid-menubar").length)try{Ye("#"+K.p.id+"_menubar").hide()}catch(e){}}),this.p.id=this.id,-1===Ye.inArray(K.p.multikey,["shiftKey","altKey","ctrlKey"])&&(K.p.multikey=!1),K.p.keyName=!1,e=0;e<K.p.colModel.length;e++)M="string"==typeof
K.p.colModel[e].template?Ye.jgrid.isNull(Ye.jgrid.cmTemplate)||"object"!=typeof
Ye.jgrid.cmTemplate[K.p.colModel[e].template]?{}:Ye.jgrid.cmTemplate[K.p.colModel[e].template]:K.p.colModel[e].template,K.p.colModel[e]=Ye.extend(!0,{},K.p.cmTemplate,M||{},K.p.colModel[e]),!1===K.p.keyName&&!0===K.p.colModel[e].key&&(K.p.keyName=K.p.colModel[e].name,K.p.keyIndex=e);K.p.sortorder=K.p.sortorder.toLowerCase(),Ye.jgrid.cell_width=Ye.jgrid.cellWidth();var
we=Ye("<table style='visibility:hidden'><tr class='jqgrow'><td>1</td></tr></table)").addClass(Q(Y,"rowTable",!0,"ui-jqgrid-btable ui-common-table"));if(Ye(O).append(we),K.p.cellLayout=Ye.jgrid.floatNum(Ye("td",we).css("padding-left"))+Ye.jgrid.floatNum(Ye("td",we).css("padding-right"),10)+1,K.p.cellLayout<=0&&(K.p.cellLayout=5),Ye(we).remove(),!null===K.p.grouping&&(K.p.scroll=!1,K.p.rownumbers=!1,K.p.treeGrid=!1,K.p.gridview=!0),!0===this.p.treeGrid){try{Ye(this).jqGrid("setTreeGrid")}catch(e){}"local"!==K.p.datatype?K.p.localReader={id:"_id_"}:!1!==K.p.keyName&&(K.p.localReader={id:K.p.keyName})}if(this.p.subGrid)try{Ye(K).jqGrid("setSubGrid")}catch(e){}this.p.searchCols&&(this.p.colNames.unshift(K.p.searchColOptions.colName),this.p.colModel.unshift({name:"sc",width:K.p.searchColOptions.colWidth,sortable:!1,hidedlg:!0,search:!1,align:"left",fixed:!0,frozen:!0,colmenu:K.p.searchColOptions.colmenu,classes:"jqgrid-searchcol",labelClasses:"jqgrid-searchcolumn",coloptions:{sorting:!1,columns:!1,filtering:!1,seraching:!1,grouping:!1,freeze:!1}})),this.p.multiselect&&(this.p.colNames.unshift("<input role='checkbox' id='cb_"+this.p.id+"' class='cbox' type='checkbox'/>"),this.p.colModel.unshift({name:"cb",width:Ye.jgrid.cell_width?K.p.multiselectWidth+K.p.cellLayout:K.p.multiselectWidth,sortable:!1,resizable:!1,hidedlg:!0,search:!1,align:"center",fixed:!0,frozen:!0,classes:"jqgrid-multibox",labelClasses:"jqgrid-multibox"})),this.p.rownumbers&&(this.p.colNames.unshift(""),this.p.colModel.unshift({name:"rn",width:K.p.rownumWidth,sortable:!1,resizable:!1,hidedlg:!0,search:!1,align:"center",fixed:!0,frozen:!0,labelClasses:"jqgrid-rownumber"})),K.p.xmlReader=Ye.extend(!0,{root:"rows",row:"row",page:"rows>page",total:"rows>total",records:"rows>records",repeatitems:!0,cell:"cell",id:"[id]",userdata:"userdata",subgrid:{root:"rows",row:"row",repeatitems:!0,cell:"cell"}},K.p.xmlReader),K.p.jsonReader=Ye.extend(!0,{root:"rows",page:"page",total:"total",records:"records",repeatitems:!0,cell:"cell",id:"id",userdata:"userdata",subgrid:{root:"rows",repeatitems:!0,cell:"cell"}},K.p.jsonReader),K.p.localReader=Ye.extend(!0,{root:"rows",page:"page",total:"total",records:"records",repeatitems:!1,cell:"cell",id:"id",userdata:"userdata",subgrid:{root:"rows",repeatitems:!0,cell:"cell"}},K.p.localReader),K.p.scroll&&(K.p.pgbuttons=!1,K.p.pginput=!1,K.p.rowList=[]),K.p.data.length&&(H(),ae());var
je,_e,ye,c,p,xe,De,qe,i="<thead><tr class='ui-jqgrid-labels' role='row'>",Ce="",r="",o="";if(!0===K.p.shrinkToFit&&!0===K.p.forceFit)for(e=K.p.colModel.length-1;0<=e;e--)if(!K.p.colModel[e].hidden){K.p.colModel[e].resizable=!1;break}if("horizontal"===K.p.viewsortcols[1]?(r=" ui-i-asc",o=" ui-i-desc"):"single"===K.p.viewsortcols[1]&&(r=" ui-single-sort-asc",Ce=" style='display:none'",K.p.viewsortcols[0]=!(o=" ui-single-sort-desc")),je=R?"class='ui-th-div-ie'":"",xe="<span class='s-ico' style='display:none'>",xe=(xe+="<span sort='asc'  class='ui-grid-ico-sort ui-icon-asc"+r+" ui-sort-"+v+" "+b+" "+q+" "+Q(Y,"icon_asc",!0)+"'"+Ce+"></span>")+("<span sort='desc' class='ui-grid-ico-sort ui-icon-desc"+o+" ui-sort-"+v+" "+b+" "+q+" "+Q(Y,"icon_desc",!0)+"'"+Ce+"></span></span>"),K.p.multiSort&&K.p.sortname)for(I=K.p.sortname.split(","),e=0;e<I.length;e++)B=Ye.jgrid.trim(I[e]).split(" "),I[e]=Ye.jgrid.trim(B[0]),G[e]=B[1]?Ye.jgrid.trim(B[1]):K.p.sortorder||"asc";for(e=0;e<this.p.colNames.length;e++){var
n,Ie=K.p.headertitles?' title="'+(K.p.colModel[e].tooltip||Ye.jgrid.stripHtml(K.p.colNames[e]))+'"':"";(n=K.p.colModel[e]).hasOwnProperty("colmenu")||(n.colmenu="rn"!==n.name&&"cb"!==n.name&&"subgrid"!==n.name),i+="<th id='"+K.p.id+"_"+n.name+"' role='columnheader' "+Q(Y,"headerBox",!1,"ui-th-column ui-th-"+v+" "+(n.labelClasses||""))+Ie+">",Ie=n.index||n.name,i+="<div class='ui-th-div' id='jqgh_"+K.p.id+"_"+n.name+"' "+je+">"+K.p.colNames[e],n.width?n.width=parseInt(n.width,10):n.width=K.p.defaultColWidth,"boolean"!=typeof
n.title&&(n.title=!0),n.lso="",Ie===K.p.sortname&&(K.p.lastsort=e),K.p.multiSort&&-1!==(B=Ye.inArray(Ie,I))&&(n.lso=G[B]),i+=xe,K.p.colMenu&&n.colmenu&&(i+="<a title='"+Ye.jgrid.getRegional(K,"colmenu.hovermenu")+"' class='"+("ltr"===K.p.direction?"colmenu":"colmenu-rtl")+"'><span class='colmenuspan "+q+" "+C.icon_menu+"'></span></a>"),i+="</div></th>"}i+="</tr></thead>",n=xe=null,Ye(this).append(i),Ye("thead tr",this).first().find("th").hover(function(){Ye(this).addClass(D)},function(){Ye(this).removeClass(D)}),this.p.multiselect&&(De=[],Ye("#cb_"+Ye.jgrid.jqID(K.p.id),this).on("click",function(){K.p.preserveSelection||(K.p.selarrrow=[]);var
t=!0===K.p.frozenColumns?K.p.id+"_frozen":"";this.checked?(Ye(K.rows).each(function(e){0<e&&(Ye(this).hasClass("ui-subgrid")||Ye(this).hasClass("jqgroup")||Ye(this).hasClass(b)||Ye(this).hasClass("jqfoot")||(Ye("#jqg_"+Ye.jgrid.jqID(K.p.id)+"_"+Ye.jgrid.jqID(this.id))[K.p.useProp?"prop":"attr"]("checked",!0),Ye(this).addClass($).attr("aria-selected","true"),K.p.preserveSelection&&-1!==K.p.selarrrow.indexOf(this.id)||K.p.selarrrow.push(this.id),K.p.selrow=this.id,t&&(Ye("#jqg_"+Ye.jgrid.jqID(K.p.id)+"_"+Ye.jgrid.jqID(this.id),K.grid.fbDiv)[K.p.useProp?"prop":"attr"]("checked",!0),Ye("#"+Ye.jgrid.jqID(this.id),K.grid.fbDiv).addClass($))))}),qe=!0,De=[]):(Ye(K.rows).each(function(e){0<e&&(Ye(this).hasClass("ui-subgrid")||Ye(this).hasClass("jqgroup")||Ye(this).hasClass(b)||Ye(this).hasClass("jqfoot")||(Ye("#jqg_"+Ye.jgrid.jqID(K.p.id)+"_"+Ye.jgrid.jqID(this.id))[K.p.useProp?"prop":"attr"]("checked",!1),Ye(this).removeClass($).attr("aria-selected","false"),De.push(this.id),K.p.preserveSelection&&-1<(e=K.p.selarrrow.indexOf(this.id))&&K.p.selarrrow.splice(e,1),t&&(Ye("#jqg_"+Ye.jgrid.jqID(K.p.id)+"_"+Ye.jgrid.jqID(this.id),K.grid.fbDiv)[K.p.useProp?"prop":"attr"]("checked",!1),Ye("#"+Ye.jgrid.jqID(this.id),K.grid.fbDiv).removeClass($))))}),K.p.selrow=null,qe=!1),Ye(K).triggerHandler("jqGridSelectAll",[qe?K.p.selarrrow:De,qe]),Ye.jgrid.isFunction(K.p.onSelectAll)&&K.p.onSelectAll.call(K,qe?K.p.selarrrow:De,qe)})),!0===K.p.autowidth&&(r=Ye(O).parent().width(),n=Ye(window).width(),K.p.width=3<n-r?r:n);var
Ge,a,Se,Ne,ke="",Me="",o=-1===K.p.styleUI.search("Bootstrap")||isNaN(K.p.height)?0:2,s=0,l=Ye.jgrid.cell_width?0:J(K.p.cellLayout,0),d=0,r=J(K.p.scrollOffset,0),u=!1,g=0;if(Ye.each(K.p.colModel,function(){var
e;void
0===this.hidden&&(this.hidden=!1),K.p.grouping&&K.p.autowidth&&0<=(e=Ye.inArray(this.name,K.p.groupingView.groupField))&&K.p.groupingView.groupColumnShow.length>e&&(this.hidden=!K.p.groupingView.groupColumnShow[e]),this.widthOrg=J(this.width,0),this.maxWidth&&J(this.width,0)>J(this.maxWidth,0)&&(this.width=this.maxWidth),a=J(this.width,0),!1===this.hidden&&(s+=a+l,this.fixed?g+=a+l:d++)}),isNaN(K.p.width)&&(K.p.width=s+(!1!==K.p.shrinkToFit||isNaN(K.p.height)?0:r)),j.width=parseInt(K.p.width,10),K.p.tblwidth=s,!1===K.p.shrinkToFit&&!0===K.p.forceFit&&(K.p.forceFit=!1),!0===K.p.shrinkToFit&&0<d){Se=j.width-l*d-g,isNaN(K.p.height)||(Se-=r,u=!0);var
s=0,ze=0,Re=0,Be=[],Oe=0,h=(Ye.each(K.p.colModel,function(e){!1!==this.hidden||this.fixed||(a=Math.round(Se*this.width/(K.p.tblwidth-l*d-g)),this.maxWidth&&a>this.maxWidth?(ze++,Re+=a,this.width=this.maxWidth,Ne=e):(this.width=a,Oe+=a,Be.push(e+"")),s+=this.width,Ge=e)}),Le=(S=0)===o?-1:0,s+=Re,-1);if(0<ze&&0<d){for(var
Ae=0,Fe=0;Fe<Be.length;Fe++)h=parseInt(Be[Fe],10),Ae+=Math.round(K.p.colModel[h].width*Re/Oe),K.p.colModel[h].width=K.p.colModel[h].width+Math.round(K.p.colModel[h].width*Re/Oe);Ae!==Re&&(K.p.colModel[h].width+=Re-Ae)}u?j.width-g-(s+l*d)!==r&&(S=j.width-g-(s+l*d)-r):0!==Math.abs(j.width-g-(s+l*d))&&(S=j.width-g-(s+l*d)-o),-1<h&&Ge===Ne&&(Ge=h),K.p.colModel[Ge].width+=S+Le,K.p.tblwidth=s+S+l*d+g,K.p.tblwidth>K.p.width&&(K.p.colModel[Ge].width-=K.p.tblwidth-parseInt(K.p.width,10),K.p.tblwidth=K.p.width)}we=-1!==K.p.styleUI.search("Bootstrap"),Ye(O).css("width",j.width+"px").append("<div class='ui-jqgrid-resize-mark' id='rs_m"+K.p.id+"'>&#160;</div>"),K.p.scrollPopUp&&Ye(O).append("<div "+Q(Y,"scrollBox",!1,"loading ui-scroll-popup")+" id='scroll_g"+K.p.id+"'></div>"),Ye(t).css("width",j.width+"px"),i=Ye(K).find("thead").first().get(0),K.p.footerrow&&(ke+="<table role='presentation' style='width:"+K.p.tblwidth+"px' "+Q(Y,"footerTable",!1,"ui-jqgrid-ftable ui-common-table")+"><tbody><tr role='row' "+Q(Y,"footerBox",!1,"footrow footrow-"+v)+">"),K.p.headerrow&&(Me+="<table role='presentation' style='width:"+K.p.tblwidth+"px' "+Q(Y,"headerRowTable",!1,"ui-jqgrid-hrtable ui-common-table")+"><tbody><tr role='row' "+Q(Y,"headerRowBox",!1,"hrheadrow hrheadrow-"+v)+">");var
u=Ye(i).find("tr").first(),Pe="<tr class='jqgfirstrow "+("rtl"===K.p.direction?"ui-row-rtl'":"'")+" role='row'>",Te=0,He=Ye.jgrid.getFont(Ye("th",u).first()[0]);if(K.p.disableClick=!1,Ye("th",u).each(function(e){n=K.p.colModel[e],_e=n.width,void
0===n.resizable&&(n.resizable=!0),n.resizable?(ye=document.createElement("span"),Ye(ye).html("&#160;").addClass("ui-jqgrid-resize ui-jqgrid-resize-"+v).css("cursor","col-resize"),Ye(this).addClass(K.p.resizeclass)):ye="",Ye(this).css("width",_e+"px").prepend(ye),ye=null;var
t="",i="",i=(n.hidden&&(Ye(this).css("display","none"),t="display:none;"),n.labelClasses&&(i="class='"+n.labelClasses+"'"),Pe+="<td "+i+" role='gridcell' style='height:0px;width:"+_e+"px;"+t+"'></td>",j.headers[e]={width:_e,el:this},"boolean"!=typeof(Ce=n.sortable)&&(n.sortable=!0,Ce=!0),n.name);"cb"!==i&&"subgrid"!==i&&"rn"!==i&&"sc"!==i&&K.p.viewsortcols[2]&&Ye(">div",this).addClass("ui-jqgrid-sortable"),n.canvas_width=n.autosize_headers?Ye.jgrid.getTextWidth(Ye("div",this).html(),He)+(n.colmenu?Ye.jgrid.floatNum(Ye(".colmenuspan",this).parent().width()):0)+Ye.jgrid.floatNum(Ye("div",this).css("padding-left"))+Ye.jgrid.floatNum(Ye("div",this).css("padding-right"))+Ye.jgrid.floatNum(Ye(".ui-jqgrid-resize",this).width()):0,Ce&&(K.p.multiSort?K.p.viewsortcols[0]?(Ye("div span.s-ico",this).show(),n.lso&&Ye("div span.ui-icon-"+n.lso,this).removeClass(b).css("display","")):n.lso&&(Ye("div span.s-ico",this).show(),Ye("div span.ui-icon-"+n.lso,this).removeClass(b).css("display","")):K.p.viewsortcols[0]?(Ye("div span.s-ico",this).show(),e===K.p.lastsort&&Ye("div span.ui-icon-"+K.p.sortorder,this).removeClass(b).css("display","")):e===K.p.lastsort&&""!==K.p.sortname&&(Ye("div span.s-ico",this).show(),Ye("div span.ui-icon-"+K.p.sortorder,this).removeClass(b).css("display",""))),K.p.footerrow&&(ke+="<td role='gridcell' "+F(e,0,"",null,"",!1)+">&#160;</td>"),K.p.headerrow&&(Me+="<td role='gridcell' "+F(e,0,"",null,"",!1)+">&#160;</td>")}).mousedown(function(e){if(1===Ye(e.target).closest("th>span.ui-jqgrid-resize").length){var
t,i=ge(this);if(e.preventDefault(),Te++,setTimeout(function(){Te=0},400),2!==Te)return!0===K.p.forceFit&&(K.p.nv=function(e){for(var
t=e,i=e,r=e+1;r<K.p.colModel.length;r++)if(!0!==K.p.colModel[r].hidden){i=r;break}return i-t}(i)),j.dragStart(i,e,function(e){e=Ye(K.grid.headers[e].el),e=[e.position().left+e.outerWidth()];return"rtl"===K.p.direction&&(e[0]=K.p.width-e[0]),e[0]-=K.grid.bDiv.scrollLeft,e.push(Ye(K.grid.hDiv).position().top),e.push(Ye(K.grid.bDiv).offset().top-Ye(K.grid.hDiv).offset().top+Ye(K.grid.bDiv).height()),e}(i)),!1;try{!0===K.p.colModel[i].autosize&&(t=Ye(K).jqGrid("getCol",i,!1,"maxwidth"),Ye(K).jqGrid("resizeColumn",i,t+(we?K.p.cellLayout:0)).jqGrid("refreshGroupHeaders"))}catch(e){}finally{Te=0}}}).click(function(e){if(K.p.disableClick)return K.p.disableClick=!1;var
t,i,r,o="th>div.ui-th-div",o=(K.p.viewsortcols[2]||(o="th>div>span>span.ui-grid-ico-sort"),Ye(e.target).closest(o));if(1===o.length)if(r=K.p.frozenColumns?(r=Ye(this)[0].id.substring(K.p.id.length+1),Ye.jgrid.getElemByAttrVal(K.p.colModel,"name",r,!0)):ge(this),Ye(e.target).hasClass("colmenuspan")){if(Ye.jgrid.isNull(Ye("#column_menu")[0])||Ye("#column_menu").remove(),void
0!==r){var
n,a,s,l,d,c=Ye("#gbox_"+K.p.id).offset(),c=Ye(this).offset().left-c.left,p=("ltr"===K.p.direction&&(c+=Ye(this).outerWidth()),r),u=void
0,g=Ye(j.hDiv).height(),h=(Ye(".ui-search-toolbar",j.hDiv)[0]&&!isNaN(Ye(".ui-search-toolbar",j.hDiv).height())&&(g-=Ye(".ui-search-toolbar",j.hDiv).height()),Ye(j.cDiv).is(":hidden")||(g+=Ye(j.cDiv).outerHeight()),K.p.toolbar[1]&&"bottom"!==K.p.toolbar[2]&&!Ye.jgrid.isNull(Ye(j.uDiv),!0)&&(g+=Ye(j.uDiv).outerHeight()),K.p.toppager&&(g+=Ye("#"+Ye.jgrid.jqID(K.p.id)+"_toppager").outerHeight()),c=parseInt(c,10),u=g,""),f=K.p.colModel[p],m=Ye.extend({sorting:!0,columns:!0,filtering:!0,seraching:!0,grouping:!0,freeze:!0},f.coloptions),g=Ye.jgrid.getRegional(K,"colmenu"),v=K.p.colNames[p],b=[],w=Ye.jgrid.trim(f.name);for(s
in
b.push(h),f.sortable&&m.sorting&&(h='<li class="ui-menu-item" role="presentation"><a class="g-menu-item" tabindex="0" role="menuitem" data-value="sortasc"><table class="ui-common-table"><tr><td class="menu_icon"><span class="'+q+" "+C.icon_sort_asc+'"></span></td><td class="menu_text">'+g.sortasc+"</td></tr></table></a></li>",h+='<li class="ui-menu-item" role="presentation"><a class="g-menu-item" tabindex="0" role="menuitem" data-value="sortdesc"><table class="ui-common-table"><tr><td class="menu_icon"><span class="'+q+" "+C.icon_sort_desc+'"></span></td><td class="menu_text">'+g.sortdesc+"</td></tr></table></a></li>",b.push(h)),m.columns&&(h='<li class="ui-menu-item divider" role="separator"></li>',h+='<li class="ui-menu-item" role="presentation"><a class="g-menu-item" tabindex="0" role="menuitem" data-value="columns"><table class="ui-common-table"><tr><td class="menu_icon"><span class="'+q+" "+C.icon_columns+'"></span></td><td class="menu_text">'+g.columns+"</td></tr></table></a></li>",b.push(h)),m.filtering&&(h='<li class="ui-menu-item divider" role="separator"></li>',h+='<li class="ui-menu-item" role="presentation"><a class="g-menu-item" tabindex="0" role="menuitem" data-value="filtering"><table class="ui-common-table"><tr><td class="menu_icon"><span class="'+q+" "+C.icon_filter+'"></span></td><td class="menu_text">'+g.filter+" "+v+"</td></tr></table></a></li>",b.push(h)),m.grouping&&(n=Ye.inArray(f.name,K.p.groupingView.groupField),h='<li class="ui-menu-item divider" role="separator"></li>',h+='<li class="ui-menu-item" role="presentation"><a class="g-menu-item" tabindex="0" role="menuitem" data-value="grouping"><table class="ui-common-table"><tr><td class="menu_icon"><span class="'+q+" "+C.icon_group+'"></span></td><td class="menu_text">'+(-1!==n?g.ungrouping:g.grouping+" "+v)+"</td></tr></table></a></li>",b.push(h)),!m.freeze||K.p.subGrid||K.p.treeGrid||K.p.cellEdit||(a=!f.frozen||!K.p.frozenColumns,h='<li class="ui-menu-item divider" role="separator"></li>',h+='<li class="ui-menu-item" role="presentation"><a class="g-menu-item" tabindex="0" role="menuitem" data-value="freeze"><table class="ui-common-table"><tr><td class="menu_icon"><span class="'+q+" "+C.icon_freeze+'"></span></td><td class="menu_text">'+(a?g.freeze+" "+v:g.unfreeze)+"</td></tr></table></a></li>",b.push(h)),K.p.colMenuCustom)K.p.colMenuCustom.hasOwnProperty(s)&&(l=K.p.colMenuCustom[s],Ye.jgrid.isFunction(K.p.colMenuBeforeProcess)&&K.p.colMenuBeforeProcess.call(K,{module:"custom",action:l,column:l.colname}),Ye(K).triggerHandler("jqGridcolMenuBeforeProcess",[{module:"custom",action:l,column:l.colname}]),d=l.exclude.split(","),d=Ye.map(d,function(e){return Ye.jgrid.trim(e)}),l.colname===w||"_all_"===l.colname&&-1===Ye.inArray(w,d))&&(d='<li class="ui-menu-item divider" role="separator"></li>',h='<li class="ui-menu-item" role="presentation"><a class="g-menu-item" tabindex="0" role="menuitem" data-value="'+l.id+'"><table class="ui-common-table"><tr><td class="menu_icon"><span class="'+q+" "+l.icon+'"></span></td><td class="menu_text">'+l.title+"</td></tr></table></a></li>","last"===l.position?(l.separator&&b.push(d),b.push(h)):"first"===l.position&&(l.separator&&b.unshift(d),b.unshift(h)));b.unshift('<ul id="column_menu" role="menu" tabindex="0">'),b.push("</ul>"),Ye("#gbox_"+K.p.id).append(b.join("")),Ye("#column_menu").addClass("ui-search-menu modal-content column-menu jqgrid-column-menu ui-menu "+C.menu_widget).css({left:c,top:u}),"ltr"===K.p.direction&&(v=Ye("#column_menu").width()+26,Ye("#column_menu").css("left",c-v+"px")),Ye("#column_menu > li > a").hover(function(){var
e,t;Ye("#col_menu").remove(),Ye("#search_menu").remove(),"columns"===Ye(this).attr("data-value")&&(e=Ye(this).parent().width()+8,t=Ye(this).parent().position().top-5,he(t,e,Ye(this).parent(),m)),"filtering"===Ye(this).attr("data-value")&&(e=Ye(this).parent().width()+8,t=Ye(this).parent().position().top-5,fe(p,t,e,Ye(this).parent())),Ye(this).addClass(D)},function(){Ye(this).removeClass(D)}).click(function(){var
e=Ye(this).attr("data-value"),t=K.grid.headers[p].el;"sortasc"===e||"sortdesc"===e?(Ye.jgrid.isFunction(K.p.colMenuBeforeProcess)&&K.p.colMenuBeforeProcess.call(K,{module:"sorting",action:"sortasc"===e?"asc":"desc",column:f.name}),ue("jqgh_"+K.p.id+"_"+f.name,p,!0,"sortasc"===e?"asc":"desc",t)):"grouping"===e?ve(p,n):"freeze"===e&&be(p,a),"grouping"!==e&&"freeze"!==e||Ye(this).remove(),K.p.colMenuCustom.hasOwnProperty(e)&&(t=K.p.colMenuCustom[e],Ye.jgrid.isFunction(t.funcname))&&(t.funcname.call(K,w),t.closeOnRun)&&Ye(this).remove()}),parseFloat(Ye("#column_menu").css("left"))<0&&Ye("#column_menu").css("left",Ye(K).css("left")),!0===K.p.menubar&&Ye("#"+K.p.id+"_menubar").hide(),e.stopPropagation()}}else
K.p.viewsortcols[2]||(t=!0,i=o.attr("sort")),Ye.jgrid.isNull(r)||ue(Ye("div",this)[0].id,r,t,i,this),void
0!==K.p.selHeadInd&&Ye(j.headers[K.p.selHeadInd].el).attr("tabindex","-1"),K.p.selHeadInd=r,Ye(this).attr("tabindex","0")}),n=null,jQuery._cacheCanvas=null,K.p.sortable&&Ye.fn.sortable)try{Ye(K).jqGrid("sortableColumns",u)}catch(e){}K.p.footerrow&&(ke+="</tr></tbody></table>"),K.p.headerrow&&(Me+="</tr></tbody></table>"),Pe+="</tr>",r=document.createElement("tbody"),this.appendChild(r),Ye(this).addClass(Q(Y,"rowTable",!0,"ui-jqgrid-btable ui-common-table")).append(Pe),K.p.altRows&&Ye(this).addClass(Q(Y,"stripedTable",!0,""));var
m,y,Ee,Ue,Pe=null,Le=Ye("<table "+Q(Y,"headerTable",!1,"ui-jqgrid-htable ui-common-table")+" style='width:"+K.p.tblwidth+"px' role='presentation' aria-labelledby='gbox_"+this.id+"'></table>").append(i),x=!(!K.p.caption||!0!==K.p.hiddengrid),S=Ye("<div class='ui-jqgrid-hbox"+("rtl"===v?"-rtl":"")+"'></div>"),i=null,We=(j.hDiv=document.createElement("div"),j.hDiv.style.width=j.width-o+"px",j.hDiv.className=Q(Y,"headerDiv",!0,"ui-jqgrid-hdiv"),Ye(j.hDiv).append(S),Ye(S).append(Le),x&&Ye(j.hDiv).hide(),K.p.pager&&("string"==typeof
K.p.pager?"#"===K.p.pager.substr(0,1)&&(K.p.pager=K.p.pager.substring(1)):K.p.pager=Ye(K.p.pager).attr("id"),Ye("#"+Ye.jgrid.jqID(K.p.pager)).css({width:j.width-o+"px"}).addClass(Q(Y,"pagerBox",!0,"ui-jqgrid-pager")).appendTo(O),x&&Ye("#"+Ye.jgrid.jqID(K.p.pager)).hide(),ce(K.p.pager,""),K.p.pager="#"+Ye.jgrid.jqID(K.p.pager)),!1===K.p.cellEdit&&!0===K.p.hoverrows&&Ye(K).on({mouseover:function(e){p=Ye(e.target).closest("tr.jqgrow"),"ui-subgrid"!==Ye(p).attr("class")&&Ye(p).addClass(D)},mouseout:function(e){p=Ye(e.target).closest("tr.jqgrow"),Ye(p).removeClass(D)}}),Ye(K).before(j.hDiv).on({click:function(e){if(c=e.target,p=Ye(c,K.rows).closest("tr.jqgrow"),0===Ye(p).length||-1<p[0].className.indexOf(b)||(Ye(c,K).closest("table.ui-jqgrid-btable").attr("id")||"").replace("_frozen","")!==K.id)return this;var
t,i,r,o,n,a,s,l=Ye(c).filter(":enabled").hasClass("cbox"),d=!1!==(d=Ye(K).triggerHandler("jqGridBeforeSelectRow",[p[0].id,e]))&&"stop"!==d;if(!Ye.jgrid.isFunction(K.p.beforeSelectRow)||!1!==(s=K.p.beforeSelectRow.call(K,p[0].id,e))&&"stop"!==s||(d=!1),l&&!1===d&&Ye(e.target).prop("checked",!Ye(e.target).prop("checked")),"A"!==c.tagName&&("INPUT"!==c.tagName&&"TEXTAREA"!==c.tagName&&"OPTION"!==c.tagName&&"SELECT"!==c.tagName||l||"INPUT"===c.tagName&&c.id.startsWith("jqs_"+K.p.id)))if(m=p[0].id,0<(c=Ye(c).closest("tr.jqgrow>td")).length&&(y=Ye.jgrid.getCellIndex(c)),!0!==K.p.cellEdit||K.p.ariaBody){if(0<c.length&&(Ee=Ye(c).closest("td,th").html(),Ye(K).triggerHandler("jqGridCellSelect",[m,y,Ee,e]),Ye.jgrid.isFunction(K.p.onCellSelect))&&K.p.onCellSelect.call(K,m,y,Ee,e),d)if(K.p.multimail&&K.p.multiselect){if(e.shiftKey){if(l)return s=Ye(K).jqGrid("getGridParam","selrow"),t=Ye(K).jqGrid("getInd",m),i=Ye(K).jqGrid("getInd",s),o=r="",o=i<t?(r=s,m):(r=m,s),s=!(a=n=!1),-1<Ye.inArray(m,K.p.selarrrow)&&(s=!1),Ye.each(Ye(this).getDataIDs(),function(e,t){return(a=t===r||a)&&Ye(K).jqGrid("resetSelection",t),t!==o}),s&&Ye.each(Ye(this).getDataIDs(),function(e,t){return(n=t===r||n)&&Ye(K).jqGrid("setSelection",t,!1),t!==o}),void(K.p.selrow=i<t?o:r);window.getSelection().removeAllRanges()}Xe(m,l,e,!1)}else
K.p.multikey?e[K.p.multikey]?Ye(K).jqGrid("setSelection",m,!0,e):K.p.multiselect&&l&&(l=Ye("#jqg_"+Ye.jgrid.jqID(K.p.id)+"_"+m).is(":checked"),Ye("#jqg_"+Ye.jgrid.jqID(K.p.id)+"_"+m)[K.p.useProp?"prop":"attr"]("checked",!l)):Xe(m,l,e,!0)}else
if(K.p.multiselect&&l&&d)Ye(K).jqGrid("setSelection",m,!0,e);else
if(0<c.length)try{Ye(K).jqGrid("editCell",p[0].rowIndex,y,!0,e)}catch(e){}},reloadGrid:function(e,t){var
i;return!0===K.p.treeGrid&&(K.p.datatype=K.p.treedatatype),(t=t||{}).current&&K.grid.selectionPreserver(K),"local"===K.p.datatype?(Ye(K).jqGrid("resetSelection"),K.p.data.length&&(H(),ae())):K.p.treeGrid||(K.p.selrow=null,K.p.multiselect&&!K.p.preserveSelection&&(K.p.selarrrow=[],de(!1)),K.p.savedRow=[]),K.p.scroll&&ne.call(K,!0,!1),t.page&&((i=t.page)>K.p.lastpage&&(i=K.p.lastpage),K.p.page=i=i<1?1:i,K.grid.prevRowHeight?K.grid.bDiv.scrollTop=(i-1)*K.grid.prevRowHeight*K.p.rowNum:K.grid.bDiv.scrollTop=0),K.grid.prevRowHeight&&K.p.scroll&&void
0===t.page?(delete
K.p.lastpage,K.grid.populateVisible()):K.grid.populate(),!0===K.p.inlineNav&&Ye(K).jqGrid("showAddEditButtons"),K.p.searchCols&&!Ye.isEmptyObject(K.p._results)&&(K.p._results={},Ye.jgrid.searchColOnEnter(K.p.id,null)),!1},dblclick:function(e){var
t;if(c=e.target,p=Ye(c,K.rows).closest("tr.jqgrow"),0!==Ye(p).length)return m=p[0].rowIndex,y=Ye.jgrid.getCellIndex(c),t=Ye(K).triggerHandler("jqGridDblClickRow",[Ye(p).attr("id"),m,y,e]),!Ye.jgrid.isNull(t)||Ye.jgrid.isFunction(K.p.ondblClickRow)&&(t=K.p.ondblClickRow.call(K,Ye(p).attr("id"),m,y,e),!Ye.jgrid.isNull(t))?t:void
0},contextmenu:function(e){var
t;if(c=e.target,p=Ye(c,K.rows).closest("tr.jqgrow"),0!==Ye(p).length)return K.p.multiselect||Ye(K).jqGrid("setSelection",p[0].id,!0,e),m=p[0].rowIndex,y=Ye.jgrid.getCellIndex(c),t=Ye(K).triggerHandler("jqGridRightClickRow",[Ye(p).attr("id"),m,y,e]),!Ye.jgrid.isNull(t)||Ye.jgrid.isFunction(K.p.onRightClickRow)&&(t=K.p.onRightClickRow.call(K,Ye(p).attr("id"),m,y,e),!Ye.jgrid.isNull(t))?t:void
0}}),j.bDiv=document.createElement("div"),R&&"auto"===String(K.p.height).toLowerCase()&&(K.p.height="100%"),Ye(j.bDiv).append(Ye('<div style="position:relative;"></div>').append("<div></div>").append(this)).addClass("ui-jqgrid-bdiv").css({height:K.p.height+(isNaN(K.p.height)?"":"px"),width:j.width-o+"px"}).on("scroll",j.scrollGrid),Ye(j.bDiv).find("table").first().css({width:K.p.tblwidth+"px"}),Ye.support.tbody||2===Ye("tbody",this).length&&Ye("tbody",this).slice(1).remove(),K.p.multikey&&(Ye.jgrid.msie()?Ye(j.bDiv).on("selectstart",function(){return!1}):Ye(j.bDiv).on("mousedown",function(){return!1})),x&&Ye(j.bDiv).hide(),q+" "+Q(Y,"icon_caption_open",!0)),Ve=q+" "+Q(Y,"icon_caption_close",!0),Ke=(j.cDiv=document.createElement("div"),!0===K.p.hidegrid?Ye("<a role='link' class='ui-jqgrid-titlebar-close HeaderButton "+z+"' title='"+(Ye.jgrid.getRegional(K,"defaults.showhide",K.p.showhide)||"")+"' />").hover(function(){Ke.addClass(D)},function(){Ke.removeClass(D)}).append("<span class='ui-jqgrid-headlink "+We+"'></span>").css("rtl"===v?"left":"right","0px"):"");Ye(j.cDiv).append(Ke).append("<span class='ui-jqgrid-title'>"+K.p.caption+"</span>").addClass("ui-jqgrid-titlebar ui-jqgrid-caption"+("rtl"===v?"-rtl":"")+" "+Q(Y,"gridtitleBox",!0)),!0===K.p.menubar&&(t='<ul id="'+K.p.id+'_menubar" class="ui-search-menu modal-content column-menu ui-menu jqgrid-caption-menu '+C.menu_widget+'" role="menubar" tabindex="0"></ul>',Ye("#gbox_"+K.p.id).append(t),Ye(j.cDiv).append("<a role='link' class='ui-jqgrid-menubar menubar-"+("rtl"===v?"rtl":"ltr")+"' style=''><span class='colmenuspan "+q+" "+C.icon_toolbar_menu+"'></span></a>"),Ye(".ui-jqgrid-menubar",j.cDiv).hover(function(){Ye(this).addClass(D)},function(){Ye(this).removeClass(D)}).on("click",function(e){e=Ye(e.target).position();Ye("#"+K.p.id+"_menubar").show(),"rtl"===K.p.direction&&Ye("#"+K.p.id+"_menubar").css({left:e.left-Ye("#"+K.p.id+"_menubar").width()-20})})),Ye(j.cDiv).insertBefore(j.hDiv),K.p.toolbar[0]&&(u=Q(Y,"customtoolbarBox",!0,"ui-userdata"),j.uDiv=document.createElement("div"),"top"===K.p.toolbar[1]?Ye(j.uDiv).insertBefore(j.hDiv):"bottom"===K.p.toolbar[1]&&Ye(j.uDiv).insertAfter(j.hDiv),"both"===K.p.toolbar[1]?(j.ubDiv=document.createElement("div"),Ye(j.uDiv).addClass(u+" ui-userdata-top").attr("id","t_"+this.id).insertBefore(j.hDiv).width(j.width-o),Ye(j.ubDiv).addClass(u+" ui-userdata-bottom").attr("id","tb_"+this.id).insertAfter(j.hDiv).width(j.width-o),x&&Ye(j.ubDiv).hide()):Ye(j.uDiv).width(j.width-o).addClass(u+" ui-userdata-top").attr("id","t_"+this.id),x)&&Ye(j.uDiv).hide(),K.p.toppager&&(K.p.toppager=Ye.jgrid.jqID(K.p.id)+"_toppager",j.topDiv=Ye("<div id='"+K.p.toppager+"'></div>")[0],Ye(j.topDiv).addClass(Q(Y,"toppagerBox",!0,"ui-jqgrid-toppager")).width(j.width-o).insertBefore(j.hDiv),ce(K.p.toppager,"_t"),K.p.toppager="#"+K.p.toppager),K.p.footerrow&&(j.sDiv=Ye("<div class='ui-jqgrid-sdiv'></div>")[0],S=Ye("<div class='ui-jqgrid-hbox"+("rtl"===v?"-rtl":"")+"'></div>"),Ye(j.sDiv).append(S).width(j.width-o).insertAfter(j.hDiv),Ye(S).append(ke),j.footers=Ye(".ui-jqgrid-ftable",j.sDiv)[0].rows[0].cells,K.p.rownumbers&&(j.footers[0].className=Q(Y,"rownumBox",!0,"jqgrid-rownum")),x)&&Ye(j.sDiv).hide(),K.p.headerrow&&(j.hrDiv=Ye("<div class='ui-jqgrid-hrdiv'></div>")[0],S=Ye("<div class='ui-jqgrid-hbox"+("rtl"===v?"-rtl":"")+"'></div>"),Ye(j.hrDiv).append(S).width(j.width-o).insertAfter(j.hDiv),Ye(S).append(Me),j.hrheaders=Ye(".ui-jqgrid-hrtable",j.hrDiv)[0].rows[0].cells,K.p.rownumbers&&(j.hrheaders[0].className=Q(Y,"rownumBox",!0,"jqgrid-rownum")),x)&&Ye(j.nDiv).hide(),S=null,K.p.caption?(Ue=K.p.datatype,!0===K.p.hidegrid&&(Ye(".ui-jqgrid-titlebar-close",j.cDiv).click(function(e){var
t,i=Ye.jgrid.isFunction(K.p.onHeaderClick),r=".ui-jqgrid-bdiv, .ui-jqgrid-hdiv, .ui-jqgrid-toppager, .ui-jqgrid-pager, .ui-jqgrid-sdiv, .ui-jqgrid-hrdiv",o=this;return!0===K.p.toolbar[0]&&("both"===K.p.toolbar[1]&&(r+=", #"+Ye(j.ubDiv).attr("id")),r+=", #"+Ye(j.uDiv).attr("id")),t=Ye(r,"#gview_"+Ye.jgrid.jqID(K.p.id)).length,"visible"===K.p.gridstate?Ye(r,"#gbox_"+Ye.jgrid.jqID(K.p.id)).slideUp("fast",function(){0===--t&&(Ye("span",o).removeClass(We).addClass(Ve),K.p.gridstate="hidden",Ye("#gbox_"+Ye.jgrid.jqID(K.p.id)).hasClass("ui-resizable")&&Ye(".ui-resizable-handle","#gbox_"+Ye.jgrid.jqID(K.p.id)).hide(),Ye(K).triggerHandler("jqGridHeaderClick",[K.p.gridstate,e]),i)&&!x&&K.p.onHeaderClick.call(K,K.p.gridstate,e)}):"hidden"===K.p.gridstate&&Ye(r,"#gbox_"+Ye.jgrid.jqID(K.p.id)).slideDown("fast",function(){0===--t&&(Ye("span",o).removeClass(Ve).addClass(We),x&&(K.p.datatype=Ue,_(),x=!1),K.p.gridstate="visible",Ye("#gbox_"+Ye.jgrid.jqID(K.p.id)).hasClass("ui-resizable")&&Ye(".ui-resizable-handle","#gbox_"+Ye.jgrid.jqID(K.p.id)).show(),Ye(K).triggerHandler("jqGridHeaderClick",[K.p.gridstate,e]),i)&&!x&&K.p.onHeaderClick.call(K,K.p.gridstate,e)}),!1}),x)&&(K.p.datatype="local",Ye(".ui-jqgrid-titlebar-close",j.cDiv).trigger("click"))):(Ye(j.cDiv).hide(),K.p.toppager||Ye(j.hDiv).addClass(Q(K.p.styleUI+".common","cornertop",!0))),(K.p.headerrow?Ye(j.hrDiv):Ye(j.hDiv)).after(j.bDiv),Ye(j.hDiv).mousemove(function(e){if(j.resizing)return j.dragMove(e),!1}),Ye(".ui-jqgrid-labels",j.hDiv).on("selectstart",function(){return!1}),Ye(document).on("mouseup.jqGrid"+K.p.id,function(){return!j.resizing||(j.dragEnd(!0),!1)}),"rtl"===K.p.direction&&Ye(K).on("jqGridAfterGridComplete.setRTLPadding",function(){var
e=j.bDiv.offsetWidth-j.bDiv.clientWidth;0<e&&(e+=2),Ye(j.hDiv).find("div").first().hasClass("ui-jqgrid-hbox-rtl")&&Ye(j.hDiv).find("div").first().css({paddingLeft:e+"px"}),j.hDiv.scrollLeft=j.bDiv.scrollLeft}),K.p.autoResizing&&Ye(K).on("jqGridAfterGridComplete.setAutoSizeColumns",function(){var
e=!1;!0===K.p.frozenColumns&&(Ye(K).jqGrid("destroyFrozenColumns"),e=!0),Ye(K.p.colModel).each(function(e){this.autosize&&!this.hidden&&this._maxsize&&0<this._maxsize&&Ye(K).jqGrid("resizeColumn",e,this._maxsize+K.p.cellLayout,!1,!1)}),Ye(K).jqGrid("refreshGroupHeaders"),e&&Ye(K).jqGrid("setFrozenColumns")}),K.p.searchCols&&(Ye(K).on("jqGridPaging.searchCols",function(){Ye.isEmptyObject(K.p._results)||(K.p._results={},Ye.jgrid.searchColOnEnter(K.p.id,null))}),Ye(K).on("jqGridSortCol.searchCols",function(){Ye.isEmptyObject(K.p._results)||(K.p._results={},Ye.jgrid.searchColOnEnter(K.p.id,null))}),K.p.colMenu)&&K.p.searchColOptions.colmenu&&Ye(K).jqGrid("addColSearchMenu"),K.formatCol=F,K.sortData=ue,K.updatepager=function(e,t){var
i,r,o,n,a,s,l,d=K.p.pager?K.p.pager.substring(1):"",d=d?"_"+d:"",c=K.p.toppager?"_"+K.p.toppager.substr(1):"",p=parseInt(K.p.page,10)-1;p<0&&(p=0),i=(p*=parseInt(K.p.rowNum,10))+K.p.reccount,K.p.scroll&&(n=Ye("tbody",K.grid.bDiv).first().find("> tr").slice(1),i>K.p.records&&(i=K.p.records),p=i-n.length,K.p.reccount=n.length,(n=n.outerHeight()||K.grid.prevRowHeight)&&(l=p*n,s=parseInt(K.p.records,10)*n,Ye(K.grid.bDiv).find(">div").first().css({height:s}).children("div").first().css({height:l,display:l?"":"none"}),0===K.grid.bDiv.scrollTop)&&1<K.p.page&&(K.grid.bDiv.scrollTop=K.p.rowNum*(K.p.page-1)*n),K.grid.bDiv.scrollLeft=K.grid.hDiv.scrollLeft),s=K.p.pager||"",(s+=K.p.toppager?s?","+K.p.toppager:K.p.toppager:"")&&(l=Ye.jgrid.getRegional(K,"formatter.integer"),n=J(K.p.page),a=J(K.p.lastpage),Ye(".selbox",s)[this.p.useProp?"prop":"attr"]("disabled",!1),!0===K.p.pginput&&(Ye(".ui-pg-input",s)[Ye(".ui-pg-input",s).first().is(":input")?"val":"html"](K.p.page),o=K.p.toppager?"#sp_1"+d+",#sp_1"+d+"_toppager":"#sp_1"+d,Ye(o).html(Ye.fmatter?Ye.fmatter.util.NumberFormat(K.p.lastpage,l):K.p.lastpage)),K.p.viewrecords&&(0===K.p.reccount?Ye(".ui-paging-info",s).html(Ye.jgrid.getRegional(K,"defaults.emptyrecords",K.p.emptyrecords)):(o=p+1,r=K.p.records,Ye.fmatter&&(o=Ye.fmatter.util.NumberFormat(o,l),i=Ye.fmatter.util.NumberFormat(i,l),r=Ye.fmatter.util.NumberFormat(r,l)),l=Ye.jgrid.getRegional(K,"defaults.recordtext",K.p.recordtext),Ye(".ui-paging-info",s).html(Ye.jgrid.template(l,o,i,r)))),!0===K.p.pgbuttons)&&(1===(n=n<=0?a=0:n)||0===n?(Ye("#first"+d+", #prev"+d).addClass(b).removeClass(D),K.p.toppager&&Ye("#first_t"+c+", #prev_t"+c).addClass(b).removeClass(D)):(Ye("#first"+d+", #prev"+d).removeClass(b),K.p.toppager&&Ye("#first_t"+c+", #prev_t"+c).removeClass(b)),n===a||0===n?(Ye("#next"+d+", #last"+d).addClass(b).removeClass(D),K.p.toppager&&Ye("#next_t"+c+", #last_t"+c).addClass(b).removeClass(D)):(Ye("#next"+d+", #last"+d).removeClass(b),K.p.toppager&&Ye("#next_t"+c+", #last_t"+c).removeClass(b))),!0===e&&!0===K.p.rownumbers&&Ye(">td.jqgrid-rownum",K.rows).each(function(e){Ye(this).html(p+1+e)}),0===K.p.reccount&&(s=K.p.emptyRecordRow?Q(Y,"rowBox",!0,"jqgrow ui-row-"+K.p.direction+" not-editable-row not-editable-cell "+b):"jqgfirstrow not-editable-row not-editable-cell",l=(l=se("norecs",!1,s,{},""))+(K.p.emptyRecordRow?"<td style='text-align:center;' colspan='"+j.headers.length+"'>"+Ye.jgrid.getRegional(K,"defaults.emptyrecords",K.p.emptyrecords)+"</td>":"<td style='height:0.1px;visibility:hidden;' colspan='"+j.headers.length+"'>&nbsp;</td>")+"</tr>",Ye(j.bDiv).find("table").first().append(l)),t&&K.p.jqgdnd&&Ye(K).jqGrid("gridDnD","updateDnD"),Ye(K).triggerHandler("jqGridGridComplete"),Ye.jgrid.isFunction(K.p.gridComplete)&&K.p.gridComplete.call(K),Ye(K).triggerHandler("jqGridAfterGridComplete")},K.refreshIndex=ae,K.setHeadCheckBox=de,K.constructTr=se,K.formatter=function(e,t,i,r,o){return T(e,t,i,r,o)},Ye.extend(j,{populate:_,emptyRows:ne,beginReq:W,endReq:f}),this.grid=j,K.addXmlData=function(e){E(e)},K.addJSONData=function(e){U(e)},K.addLocalData=function(e){return L(e)},K.treeGrid_beforeRequest=function(){K.p.treeGrid&&K.p.treeGrid_bigData&&void
0!==K.p.postData.nodeid&&"string"==typeof
K.p.postData.nodeid&&(""!==K.p.postData.nodeid||0<parseInt(K.p.postData.nodeid,10))&&(K.p.postData.rows=1e4,K.p.postData.page=1,K.p.treeGrid_rootParams.otherData.nodeid=K.p.postData.nodeid)},K.treeGrid_afterLoadComplete=function(){K.p.treeGrid&&K.p.treeGrid_bigData&&(void
0!==K.p.treeGrid_rootParams.otherData.nodeid&&"string"==typeof
K.p.treeGrid_rootParams.otherData.nodeid&&(""!==K.p.treeGrid_rootParams.otherData.nodeid||0<parseInt(K.p.treeGrid_rootParams.otherData.nodeid,10))?void
0===K.p.treeGrid_rootParams||Ye.jgrid.isNull(K.p.treeGrid_rootParams)||(K.p.page=K.p.treeGrid_rootParams.page,K.p.lastpage=K.p.treeGrid_rootParams.lastpage,K.p.postData.rows=K.p.treeGrid_rootParams.postData.rows,K.p.postData.totalrows=K.p.treeGrid_rootParams.postData.totalrows,K.p.treeGrid_rootParams.otherData.nodeid="",K.updatepager(!1,!0)):K.p.treeGrid_rootParams={page:K.p.page,lastpage:K.p.lastpage,postData:{rows:K.p.postData.rows,totalrows:K.p.postData.totalrows},rowNum:K.p.rowNum,rowTotal:K.p.rowTotal,otherData:{nodeid:""}})},this.grid.cols=this.rows[0].cells,Ye.jgrid.isFunction(K.p.onInitGrid)&&K.p.onInitGrid.call(K),Ye(K).triggerHandler("jqGridInitGrid"),_(),K.p.hiddengrid=!1,K.p.responsive&&(r="onorientationchange"in
window?"orientationchange":"resize",Ye(window).on(r,function(){Ye(K).jqGrid("resizeGrid")}))}}}function
Xe(e,t,i,r){var
o;!(K.p.multiselect&&K.p.multiboxonly||K.p.multimail)||t?Ye(K).jqGrid("setSelection",e,r,i):K.p.multiboxonly&&K.p.multimail?(Ye(K).triggerHandler("jqGridSelectRow",[e,!1,i]),K.p.onSelectRow&&K.p.onSelectRow.call(K,e,!1,i)):(o=K.p.frozenColumns?K.p.id+"_frozen":"",Ye(K.p.selarrrow).each(function(e,t){var
i=Ye(K).jqGrid("getGridRowById",t);i&&Ye(i).removeClass($),Ye("#jqg_"+Ye.jgrid.jqID(K.p.id)+"_"+Ye.jgrid.jqID(t))[K.p.useProp?"prop":"attr"]("checked",!1),o&&(Ye("#"+Ye.jgrid.jqID(t),"#"+Ye.jgrid.jqID(o)).removeClass($),Ye("#jqg_"+Ye.jgrid.jqID(K.p.id)+"_"+Ye.jgrid.jqID(t),"#"+Ye.jgrid.jqID(o))[K.p.useProp?"prop":"attr"]("checked",!1))}),K.p.selarrrow=[],Ye(K).jqGrid("setSelection",e,r,i))}});var
e,t=Ye.jgrid.getMethod(Qe);if(t)return e=Ye.makeArray(arguments).slice(1),t.apply(this,e);throw"jqGrid - No such method: "+Qe},Ye.jgrid.extend({getGridParam:function(e,t){var
i,r=this[0];if(r&&r.grid){if(i=r.p,"jqGrid"!==(t=void
0===t&&"string"!=typeof
t?"jqGrid":t))try{i=Ye(r).data(t)}catch(e){i=r.p}return e?void
0!==i[e]?i[e]:null:i}},setGridParam:function(t,i){return this.each(function(){var
e;Ye.jgrid.isNull(i)&&(i=!1),this.grid&&"object"==typeof
t&&(!0===i?(e=Ye.extend({},this.p,t),this.p=e):Ye.extend(!0,this.p,t))})},getGridRowById:function(t){var
i;return this.each(function(){try{i=this.rows.namedItem(t)}catch(e){i=Ye(this.grid.bDiv).find("#"+Ye.jgrid.jqID(t))[0]}}),i},getGridRowByIndex:function(t){var
i=null;return this.each(function(){var
e=this.rows.length-1;1<=t&&1<=e&&t<=e&&(i=this.rows[t])}),i},getDataIDs:function(){var
e,t=[],i=0,r=0;return this.each(function(){if((e=this.rows.length)&&0<e)for(;i<e;)Ye(this.rows[i]).hasClass("jqgrow")&&"norecs"!==this.rows[i].id&&(t[r]=this.rows[i].id,r++),i++}),t},setSelection:function(d,c,p,u){return this.each(function(){var
e,t,i,r,o,n,a=this,s=Ye.jgrid.getMethod("getStyleUI"),l=s(a.p.styleUI+".common","highlight",!0),s=s(a.p.styleUI+".common","disabled",!0);void
0!==d&&(u=!1!==(u=void
0===u?!0:u),c=!1!==c,t=Ye(a).jqGrid("getGridRowById",d))&&t.className&&!(-1<t.className.indexOf(s))&&(!0===a.p.scrollrows&&0<=(s=Ye(a).jqGrid("getGridRowById",d).rowIndex)&&(s=s,r=Ye(a.grid.bDiv)[0].clientHeight,o=Ye(a.grid.bDiv)[0].scrollTop,n=Ye(a.rows[s]).position().top,s=a.rows[s].clientHeight,r+o<=n+s?Ye(a.grid.bDiv)[0].scrollTop=n-(r+o)+s+o:n<r+o&&n<o&&(Ye(a.grid.bDiv)[0].scrollTop=n)),!0===a.p.frozenColumns&&(i=a.p.id+"_frozen"),a.p.multiselect?(a.setHeadCheckBox(!1),a.p.selrow=t.id,-1===(s=Ye.inArray(a.p.selrow,a.p.selarrrow))?("ui-subgrid"!==t.className&&Ye(t).addClass(l).attr("aria-selected","true"),e=!0,a.p.selarrrow.push(a.p.selrow)):-1!==s&&"_sp_"===p?("ui-subgrid"!==t.className&&Ye(t).addClass(l).attr("aria-selected","true"),e=!0):("ui-subgrid"!==t.className&&Ye(t).removeClass(l).attr("aria-selected","false"),e=!1,a.p.selarrrow.splice(s,1),r=a.p.selarrrow[0],a.p.selrow=void
0===r?null:r),Ye("#jqg_"+Ye.jgrid.jqID(a.p.id)+"_"+Ye.jgrid.jqID(t.id))[a.p.useProp?"prop":"attr"]("checked",e),i&&(u&&(-1===s?Ye("#"+Ye.jgrid.jqID(d),"#"+Ye.jgrid.jqID(i)).addClass(l):Ye("#"+Ye.jgrid.jqID(d),"#"+Ye.jgrid.jqID(i)).removeClass(l)),Ye("#jqg_"+Ye.jgrid.jqID(a.p.id)+"_"+Ye.jgrid.jqID(d),"#"+Ye.jgrid.jqID(i))[a.p.useProp?"prop":"attr"]("checked",e)),c&&(Ye(a).triggerHandler("jqGridSelectRow",[t.id,e,p]),a.p.onSelectRow)&&a.p.onSelectRow.call(a,t.id,e,p)):"ui-subgrid"!==t.className&&(e=a.p.selrow!==t.id&&(u&&((o=Ye(a).jqGrid("getGridRowById",a.p.selrow))&&Ye(o).removeClass(l).attr({"aria-selected":"false",tabindex:"-1"}),Ye(t).addClass(l).attr({"aria-selected":"true",tabindex:"0"}),i)&&(Ye("#"+Ye.jgrid.jqID(a.p.selrow),"#"+Ye.jgrid.jqID(i)).removeClass(l),Ye("#"+Ye.jgrid.jqID(d),"#"+Ye.jgrid.jqID(i)).addClass(l)),!0),a.p.selrow=t.id,c)&&(Ye(a).triggerHandler("jqGridSelectRow",[t.id,e,p]),a.p.onSelectRow)&&a.p.onSelectRow.call(a,t.id,e,p))})},resetSelection:function(a){return this.each(function(){var
i,e,t,r=this,o=Ye.jgrid.getMethod("getStyleUI"),n=o(r.p.styleUI+".common","highlight",!0),o=o(r.p.styleUI+".common","hover",!0);!0===r.p.frozenColumns&&(i=r.p.id+"_frozen"),void
0!==a?(t=a===r.p.selrow?r.p.selrow:a,Ye("#"+Ye.jgrid.jqID(r.p.id)+" tbody").first().find("tr#"+Ye.jgrid.jqID(t)).removeClass(n).attr("aria-selected","false"),i&&Ye("#"+Ye.jgrid.jqID(t),"#"+Ye.jgrid.jqID(i)).removeClass(n),r.p.multiselect&&(Ye("#jqg_"+Ye.jgrid.jqID(r.p.id)+"_"+Ye.jgrid.jqID(t),"#"+Ye.jgrid.jqID(r.p.id))[r.p.useProp?"prop":"attr"]("checked",!1),i&&Ye("#jqg_"+Ye.jgrid.jqID(r.p.id)+"_"+Ye.jgrid.jqID(t),"#"+Ye.jgrid.jqID(i))[r.p.useProp?"prop":"attr"]("checked",!1),r.setHeadCheckBox(!1),-1!==(e=Ye.inArray(Ye.jgrid.jqID(t),r.p.selarrrow)))&&r.p.selarrrow.splice(e,1),r.p.onUnSelectRow&&r.p.onUnSelectRow.call(r,t),t=null):r.p.multiselect?(Ye(r.p.selarrrow).each(function(e,t){Ye(Ye(r).jqGrid("getGridRowById",t)).removeClass(n).attr("aria-selected","false"),Ye("#jqg_"+Ye.jgrid.jqID(r.p.id)+"_"+Ye.jgrid.jqID(t))[r.p.useProp?"prop":"attr"]("checked",!1),i&&(Ye("#"+Ye.jgrid.jqID(t),"#"+Ye.jgrid.jqID(i)).removeClass(n),Ye("#jqg_"+Ye.jgrid.jqID(r.p.id)+"_"+Ye.jgrid.jqID(t),"#"+Ye.jgrid.jqID(i))[r.p.useProp?"prop":"attr"]("checked",!1)),r.p.onUnSelectRow&&r.p.onUnSelectRow.call(r,t)}),r.setHeadCheckBox(!1),r.p.selarrrow=[],r.p.selrow=null):r.p.selrow&&(Ye("#"+Ye.jgrid.jqID(r.p.id)+" tbody").first().find("tr#"+Ye.jgrid.jqID(r.p.selrow)).removeClass(n).attr("aria-selected","false"),i&&Ye("#"+Ye.jgrid.jqID(r.p.selrow),"#"+Ye.jgrid.jqID(i)).removeClass(n),r.p.onUnSelectRow&&r.p.onUnSelectRow.call(r,r.p.selrow),r.p.selrow=null),!0===r.p.cellEdit&&0<=parseInt(r.p.iCol,10)&&0<=parseInt(r.p.iRow,10)&&(Ye("td",r.rows[r.p.iRow]).eq(r.p.iCol).removeClass("edit-cell "+n),Ye(r.rows[r.p.iRow]).removeClass("selected-row "+o))})},getRowData:function(e,n,a,s){var
l,d,c={},p=!1,u=0;return this.each(function(){var
t,i,r=this;if(Ye.jgrid.isNull(e))p=!0,l=[],d=r.rows.length;else{if(!(i=Ye(r).jqGrid("getGridRowById",e)))return c;d=1}for(n&&!0===n&&0<r.p.data.length||(n=!1),Ye.jgrid.isNull(a)&&(a=!1),Ye.jgrid.isNull(s)&&(s=!1);u<d;){if(p&&(i=r.rows[u]),Ye(i).hasClass("jqgrow")&&"norecs"!==i.id){if(!0===r.p.treeGrid&&!0===s&&Ye(i).is(":hidden")){u++;continue}if(n?c=Ye.extend({},r.p.data[r.p._index[Ye.jgrid.stripPref(r.p.idPrefix,i.id)]]):Ye(i).children('td[role="gridcell"]').each(function(e){if("cb"!==(t=r.p.colModel[e].name)&&"subgrid"!==t&&"rn"!==t&&"sc"!==t)if(!0===r.p.treeGrid&&t===r.p.ExpandColumn)c[t]=Ye.jgrid.htmlDecode(Ye(this).find("span").first().html());else
try{c[t]=Ye.unformat.call(r,this,{rowId:i.id,colModel:r.p.colModel[e]},e)}catch(e){c[t]=Ye.jgrid.htmlDecode(Ye(this).html())}}),!0===r.p.treeGrid&&a){var
o=r.p.treeReader.level_field;a+="";try{o=parseInt(c[o],10)}catch(e){o=0}c[r.p.ExpandColumn]=a.repeat(o)+c[r.p.ExpandColumn]}p&&(l.push(c),c={})}u++}}),l||c},delRowData:function(i){var
r,o,n=!1;return this.each(function(){var
e,t=this;if(!(r=Ye(t).jqGrid("getGridRowById",i)))return!1;i=r.id,t.p.subGrid&&(o=Ye(r).next()).hasClass("ui-subgrid")&&o.remove(),Ye(r).remove(),t.p.records--,t.p.reccount--,t.updatepager(!0,!1),n=!0,t.p.frozenColumns&&Ye("#"+i,"#"+Ye.jgrid.jqID(t.p.id+"_frozen")).remove(),t.p.multiselect&&-1!==(o=Ye.inArray(i,t.p.selarrrow))&&t.p.selarrrow.splice(o,1),t.p.multiselect&&0<t.p.selarrrow.length?t.p.selrow=t.p.selarrrow[t.p.selarrrow.length-1]:t.p.selrow===i&&(t.p.selrow=null),"local"===t.p.datatype&&(e=Ye.jgrid.stripPref(t.p.idPrefix,i),void
0!==(e=t.p._index[e]))&&(t.p.data.splice(e,1),t.refreshIndex())}),n},setRowData:function(d,c,p,u){var
g,h=!0;return this.each(function(){if(!this.grid)return!1;var
i,e,r,o=this,n={},a=Ye(this).jqGrid("getGridRowById",d);if(!a)return!1;if(!0===u&&(e=Ye(o).jqGrid("getRowData",d,"local"===o.p.datatype)),c){u&&(c=Ye.extend(e,c));try{if(Ye(this.p.colModel).each(function(e){g=this.name;var
t=Ye.jgrid.getAccessor(c,g);void
0!==t&&(n[g]=t,i=o.formatter(d,n[g],e,c,"edit"),r=this.title?{title:Ye.jgrid.stripHtml(i)}:{},(!0===o.p.treeGrid&&g===o.p.ExpandColumn?Ye("td[role='gridcell']",a).eq(e).find("span[class*='cell-wrapper']"):Ye("td[role='gridcell']",a).eq(e)).html(i).attr(r),o.p.frozenColumns)&&e<=o.p.frozenColCount&&Ye("#"+d+" td[role='gridcell']","#"+Ye.jgrid.jqID(o.p.id+"_frozen")).eq(e).html(i).attr(r)}),"local"===o.p.datatype){var
t,s=Ye.jgrid.stripPref(o.p.idPrefix,d),l=o.p._index[s];if(o.p.treeGrid)for(t
in
o.p.treeReader)o.p.treeReader.hasOwnProperty(t)&&delete
n[o.p.treeReader[t]];void
0!==l&&(o.p.data[l]=Ye.extend(!0,o.p.data[l],n)),n=null}}catch(e){h=!1}}h&&("string"==typeof
p?Ye(a).addClass(p):Ye.jgrid.isNull(p)||"object"!=typeof
p||Ye(a).css(p),Ye(o).triggerHandler("jqGridAfterGridComplete"))}),h},addRowData:function(a,s,l,d){-1===Ye.inArray(l,["first","last","before","after"])&&(l="last");var
c,p,u,g,h,f,m,v,b,w,j,_,y=!1,x="",D="",q="";return s&&(Array.isArray(s)?(v=!0,b=a):v=!(s=[s]),this.each(function(){var
e=this,t=s.length,i=(g=!0===e.p.rownumbers?1:0,p=!0===e.p.multiselect?1:0,u=!0===e.p.subGrid?1:0,v||(void
0!==a?a=String(a):(a=Ye.jgrid.randId(),!1!==e.p.keyName&&(b=e.p.keyName,void
0!==s[0][b])&&(a=s[0][b]))),0),r=Ye(e).jqGrid("getStyleUI",e.p.styleUI+".base","rowBox",!0,"jqgrow ui-row-"+e.p.direction),o={},n=!!Ye.jgrid.isFunction(e.p.afterInsertRow);for(g&&(x=Ye(e).jqGrid("getStyleUI",e.p.styleUI+".base","rownumBox",!1,"jqgrid-rownum")),p&&(D=Ye(e).jqGrid("getStyleUI",e.p.styleUI+".base","multiBox",!1,"cbox"));i<t;){if(w=s[i],c=[],v)try{void
0===(a=w[b])&&(a=Ye.jgrid.randId())}catch(e){a=Ye.jgrid.randId()}for(_=a,a=e.p.idPrefix+a,g&&(q=e.formatCol(0,1,"",null,a,!0),c[c.length]='<td role="gridcell" '+x+" "+q+">0</td>"),p&&(m='<input role="checkbox" type="checkbox" id="jqg_'+e.p.id+"_"+a+'" '+D+"/>",q=e.formatCol(g,1,"",null,a,!0),c[c.length]='<td role="gridcell" '+q+">"+m+"</td>"),u&&(c[c.length]=Ye(e).jqGrid("addSubGridCell",p+g,1)),f=p+u+g;f<e.p.colModel.length;f++)j=e.p.colModel[f],o[j=j.name]=w[j],m=e.formatter(a,Ye.jgrid.getAccessor(w,j),f,w),q=e.formatCol(f,1,m,w,a,o),c[c.length]='<td role="gridcell" '+q+">"+m+"</td>";if(c.unshift(e.constructTr(a,!1,r,o,w)),c[c.length]="</tr>",0===e.rows.length)Ye(e.grid.bDiv).find("table").first().append(c.join(""));else
switch(l){case"last":Ye(e.rows[e.rows.length-1]).after(c.join("")),h=e.rows.length-1;break;case"first":Ye(e.rows[0]).after(c.join("")),h=1;break;case"after":(h=Ye(e).jqGrid("getGridRowById",d))&&(Ye(e.rows[h.rowIndex+1]).hasClass("ui-subgrid")?Ye(e.rows[h.rowIndex+1]).after(c):Ye(h).after(c.join("")),h=h.rowIndex+1);break;case"before":(h=Ye(e).jqGrid("getGridRowById",d))&&(Ye(h).before(c.join("")),h=h.rowIndex-1)}if(!0===e.p.subGrid&&Ye(e).jqGrid("addSubGrid",p+g,h),e.p.records++,e.p.reccount++,Ye(e).triggerHandler("jqGridAfterInsertRow",[a,w,w]),n&&e.p.afterInsertRow.call(e,a,w,w),i++,"local"===e.p.datatype)switch(o[e.p.localReader.id]=_,l){case"first":e.p.data.unshift(o);break;case"last":e.p.data.push(o);break;case"before":case"after":e.p.data.splice(h-1,0,o)}o={},1===e.p.reccount&&(h=Ye(e).jqGrid("getGridRowById","norecs"))&&h.rowIndex&&0<h.rowIndex&&Ye(e.rows[h.rowIndex]).remove()}"local"===e.p.datatype&&e.refreshIndex(),e.updatepager(!0,!0),y=!0})),y},footerData:function(r,o,n){var
a,s,l=!1,d={};return"boolean"!=typeof
n&&(n=!0),r=(r=void
0===r?"get":r).toLowerCase(),this.each(function(){var
t,i=this;return!(!i.grid||!i.p.footerrow||"set"===r&&function(e){for(var
t
in
e)if(e.hasOwnProperty(t))return;return 1}(o))&&(l=!0,void
Ye(this.p.colModel).each(function(e){a=this.name,"set"===r?void
0!==o[a]&&(t=n?i.formatter("",o[a],e,o,"edit"):o[a],s=this.title?{title:Ye.jgrid.stripHtml(t)}:{},Ye("tr.footrow td",i.grid.sDiv).eq(e).html(t).attr(s),l=!0):"get"===r&&(d[a]=Ye("tr.footrow td",i.grid.sDiv).eq(e).html())}))}),"get"===r?d:l},headerData:function(r,o,n){var
a,s,l=!1,d={};return"boolean"!=typeof
n&&(n=!0),r=(r=void
0===r?"get":r).toLowerCase(),this.each(function(){var
t,i=this;return!(!i.grid||!i.p.headerrow||"set"===r&&function(e){for(var
t
in
e)if(e.hasOwnProperty(t))return;return 1}(o))&&(l=!0,void
Ye(this.p.colModel).each(function(e){a=this.name,"set"===r?void
0!==o[a]&&(t=n?i.formatter("",o[a],e,o,"edit"):o[a],s=this.title?{title:Ye.jgrid.stripHtml(t)}:{},Ye("tr.hrheadrow td",i.grid.hrDiv).eq(e).html(t).attr(s),l=!0):"get"===r&&(d[a]=Ye("tr.hrheadrow td",i.grid.hrDiv).eq(e).html())}))}),"get"===r?d:l},showHideCol:function(d,c){return this.each(function(){var
t,i=this,r=!1,o=Ye.jgrid.cell_width?0:i.p.cellLayout,e=!1;if(i.grid){"string"==typeof
d&&(d=[d]);var
n=""===(c="none"!==c?"":"none"),a=null,s=Ye(i).jqGrid("isGroupHeaderOn");if(i.p.frozenColumns&&(Ye(i).jqGrid("destroyFrozenColumns"),e=!0),s&&(Ye(i).jqGrid("destroyGroupHeader",!1),a=Ye.extend([],i.p.groupHeader),i.p.groupHeader=null),i.p.colSpanHeader.length&&Ye(i).jqGrid("destroyColSpanHeader",!1),Ye(this.p.colModel).each(function(e){-1!==Ye.inArray(this.name,d)&&this.hidden===n&&(Ye("tr[role=row]",i.grid.hDiv).each(function(){Ye(this.cells[e]).css("display",c)}),Ye(i.rows).each(function(){Ye(this).hasClass("jqgroup")||Ye(this.cells[e]).css("display",c)}),i.p.footerrow&&Ye("tr.footrow td",i.grid.sDiv).eq(e).css("display",c),i.p.headerrow&&Ye("tr.hrheadrow td",i.grid.hrDiv).eq(e).css("display",c),t=parseInt(this.width,10),"none"===c?i.p.tblwidth-=t+o:i.p.tblwidth+=t+o,this.hidden=!n,r=!0,Ye(i).triggerHandler("jqGridShowHideCol",[n,this.name,e]))}),!0===r&&(!0!==i.p.shrinkToFit||isNaN(i.p.height)||(i.p.tblwidth+=parseInt(i.p.scrollOffset,10)),Ye(i).jqGrid("setGridWidth",!0===i.p.shrinkToFit?i.p.tblwidth-(isNaN(i.p.height)?0:parseInt(i.p.scrollOffset,10)):i.p.width)),s&&a)for(var
l=0;l<a.length;l++)Ye(i).jqGrid("setGroupHeaders",a[l]);i.p.colSpanHeader.length&&Ye(i).jqGrid("setColSpanHeader",i.p.colSpanHeader),e&&Ye(i).jqGrid("setFrozenColumns")}})},hideCol:function(e){return this.each(function(){Ye(this).jqGrid("showHideCol",e,"none")})},showCol:function(e){return this.each(function(){Ye(this).jqGrid("showHideCol",e,"")})},hideSearchCol:function(t){return this.each(function(){try{var
e=this.p._avc.indexOf(t);-1<e&&(this.p._avc.splice(e,1),this.p._fthc.push(t),Ye(this).jqGrid("showHideCol",t,"none"))}catch(e){}})},showSearchCol:function(t){return this.each(function(){try{var
e=this.p._fthc.indexOf(t);-1<e&&(this.p._fthc.splice(e,1),this.p._avc.push(t),Ye(this).jqGrid("showHideCol",t,""))}catch(e){}})},remapColumns:function(r,e,t){function
i(t){var
i=t.length?Ye.makeArray(t):Ye.extend({},t);Ye.each(r,function(e){t[e]=i[this]})}var
o=this.get(0);function
n(e,t){Ye(">tr"+(t||""),e).each(function(){var
t=this,i=Ye.makeArray(t.cells);Ye.each(r,function(){var
e=i[this];e&&t.appendChild(e)})})}i(o.p.colModel),i(o.p.colNames),i(o.grid.headers),n(Ye(o.grid.hDiv).find("thead").first(),t&&":not(.ui-jqgrid-labels)"),e&&n(Ye("#"+Ye.jgrid.jqID(o.p.id)+" tbody").first(),".jqgfirstrow, tr.jqgrow, tr.jqfoot, tr.jqgroup"),o.p.footerrow&&n(Ye(o.grid.sDiv).find("tbody").first()),o.p.headerrow&&n(Ye(o.grid.hrDiv).find("tbody").first()),o.p.remapColumns&&(o.p.remapColumns.length?i(o.p.remapColumns):o.p.remapColumns=Ye.makeArray(r)),o.p.lastsort=Ye.inArray(o.p.lastsort,r),o.p.treeGrid&&(o.p.expColInd=Ye.inArray(o.p.expColInd,r)),Ye(o).triggerHandler("jqGridRemapColumns",[r,e,t])},setGridWidth:function(v,b,w){return this.each(function(){if(this.grid){var
e,t,i=this,r=!1,o=0,n=Ye.jgrid.cell_width?0:i.p.cellLayout,a=0,s=!1,l=i.p.scrollOffset,d=0,c=-1===i.p.styleUI.search("Bootstrap")||isNaN(i.p.height)?0:2;if("boolean"!=typeof
b&&(b=i.p.shrinkToFit),"boolean"!=typeof
w&&(w=!0),!isNaN(v)){if(v=parseInt(v,10),i.grid.width=i.p.width=v,Ye("#gbox_"+Ye.jgrid.jqID(i.p.id)).css("width",v+"px"),Ye("#gview_"+Ye.jgrid.jqID(i.p.id)).css("width",v+"px"),Ye(i.grid.bDiv).css("width",v-c+"px"),Ye(i.grid.hDiv).css("width",v-c+"px"),i.p.pager&&Ye(i.p.pager).css("width",v-c+"px"),i.p.toppager&&Ye(i.p.toppager).css("width",v-c+"px"),!0===i.p.toolbar[0]&&(Ye(i.grid.uDiv).css("width",v-c+"px"),"both"===i.p.toolbar[1])&&Ye(i.grid.ubDiv).css("width",v-c+"px"),i.p.footerrow&&Ye(i.grid.sDiv).css("width",v-c+"px"),i.p.headerrow&&Ye(i.grid.hrDiv).css("width",v-c+"px"),(e=Ye(i).jqGrid("isGroupHeaderOn"))&&Ye(i).jqGrid("destroyGroupHeader",!1),i.p.frozenColumns&&w&&(Ye(i).jqGrid("destroyFrozenColumns"),r=!0),!1===b&&!0===i.p.forceFit&&(i.p.forceFit=!1),!0===b){if(Ye.each(i.p.colModel,function(){!1===this.hidden&&(h=this.widthOrg,o+=h+n,this.fixed?d+=h+n:a++)}),0===a)return;i.p.tblwidth=o;var
p=v-n*a-d,u=Ye("#norecs","#"+Ye.jgrid.jqID(i.p.id)).eq(0),g=(isNaN(i.p.height)||(Ye(i.grid.bDiv)[0].clientHeight<=Ye(i.grid.bDiv)[0].scrollHeight||i.rows.length===u.length+1||"scroll"===Ye(i.grid.bDiv).css("overflow-y"))&&(s=!0,p-=l),(o=0)<i.grid.cols.length);if(Ye.each(i.p.colModel,function(e){!1!==this.hidden||this.fixed||(h=this.widthOrg,(h=Math.round(p*h/(i.p.tblwidth-n*a-d)))<0)||(this.width=h,o+=h,i.grid.headers[e].width=h,i.grid.headers[e].el.style.width=h+"px",i.p.footerrow&&(i.grid.footers[e].style.width=h+"px"),i.p.headerrow&&(i.grid.hrheaders[e].style.width=h+"px"),g&&(i.grid.cols[e].style.width=h+"px"),t=e)}),!t)return;u=0,s?v-d-(o+n*a)!==l&&(u=v-d-(o+n*a)-l):0!==Math.abs(v-d-(o+n*a))&&(u=v-d-(o+n*a)-c),i.p.colModel[t].width+=u,i.p.tblwidth=o+u+n*a+d,i.p.tblwidth>v?(s=i.p.tblwidth-parseInt(v,10),i.p.tblwidth=v,h=i.p.colModel[t].width=i.p.colModel[t].width-s):i.p.tblwidth===v?(h=i.p.colModel[t].width=i.p.colModel[t].width-c,i.p.tblwidth=v-c):h=i.p.colModel[t].width;var
l=Ye(i.grid.bDiv)[0].scrollWidth>Ye(i.grid.bDiv).width()&&0!=c?-1:0,h=i.p.colModel[t].width+=l;i.grid.headers[t].width=h,i.grid.headers[t].el.style.width=h+"px",g&&(i.grid.cols[t].style.width=h+"px"),i.p.footerrow&&(i.grid.footers[t].style.width=h+"px"),i.p.headerrow&&(i.grid.hrheaders[t].style.width=h+"px")}if(Ye(i.grid.bDiv).find("table").first().css("width",i.p.tblwidth+"px"),Ye(i.grid.hDiv).find("table").first().css("width",i.p.tblwidth+"px"),i.grid.hDiv.scrollLeft=i.grid.bDiv.scrollLeft,i.p.footerrow&&Ye(i.grid.sDiv).find("table").first().css("width",i.p.tblwidth+"px"),i.p.headerrow&&Ye(i.grid.hrDiv).find("table").first().css("width",i.p.tblwidth+"px"),e){var
f=Ye.extend([],i.p.groupHeader);i.p.groupHeader=null;for(var
m=0;m<f.length;m++)Ye(i).jqGrid("setGroupHeaders",f[m]);i.grid.hDiv.scrollLeft=i.grid.bDiv.scrollLeft}r&&Ye(i).jqGrid("setFrozenColumns")}}})},setGridHeight:function(o,n,a){return this.each(function(){var
e,t,i,r=this;r.grid&&(e=Ye(r.grid.bDiv),t=Ye(r.grid.hDiv).outerHeight(),"boolean"!=typeof
a&&(a=!0),!(i=!1)===(n="boolean"!=typeof
n?!1:n)&&(r.p.pager&&(t+=Ye(r.p.pager).outerHeight()),r.p.toppager&&(t+=Ye(r.p.toppager).outerHeight()),!0===r.p.toolbar[0]&&(t+=Ye(r.grid.uDiv).outerHeight(),"both"===r.p.toolbar[1])&&(t+=Ye(r.grid.ubDiv).outerHeight()),r.p.footerrow&&(t+=Ye(r.grid.sDiv).outerHeight()),r.p.headerrow&&(t+=Ye(r.grid.hrDiv).outerHeight()),r.p.caption&&(t+=Ye(r.grid.cDiv).outerHeight()),t<o)&&(o-=t),r.p.frozenColumns&&a&&(Ye(r).jqGrid("destroyFrozenColumns"),i=!0),e.css({height:o+(isNaN(o)?"":"px")}),r.p.height=o,i&&Ye(r).jqGrid("setFrozenColumns"),r.p.scroll)&&r.grid.populateVisible()})},maxGridHeight:function(r,o,n){return this.each(function(){var
e,t,i=this;i.grid&&(void
0===n&&(n=25),e=Ye(i.grid.bDiv),"set"!==r||isNaN(o)?"remove"===r&&(t=["100%","auto"].includes(i.p.height)&&Ye(i.grid.bDiv).height()<Ye(i).height(),e.css("max-height",""),t)&&Ye("#"+Ye.jgrid.jqID(i.p.id)).jqGrid("setGridWidth",i.p.width-i.p.scrollOffset+2,!1,!1):(o=parseFloat(o))>parseFloat(n)&&(e.css("max-height",o),["100%","auto"].includes(i.p.height))&&Ye(i.grid.bDiv).height()<Ye(i).height()&&Ye("#"+Ye.jgrid.jqID(i.p.id)).jqGrid("setGridWidth",i.p.width+i.p.scrollOffset-2,!1,!1))})},setCaption:function(t){return this.each(function(){var
e=Ye(this).jqGrid("getStyleUI",this.p.styleUI+".common","cornertop",!0);this.p.caption=t,Ye(".ui-jqgrid-title, .ui-jqgrid-title-rtl",this.grid.cDiv).html(t),Ye(this.grid.cDiv).show(),Ye(this.grid.hDiv).removeClass(e)})},setLabel:function(n,a,s,l){return this.each(function(){var
e=this,t=-1;if(e.grid&&!Ye.jgrid.isNull(n)&&0<=(t=isNaN(n)?Ye.jgrid.getElemByAttrVal(e.p.colModel,"name",n,!0):parseInt(n,10))){var
i=Ye("tr.ui-jqgrid-labels th",e.grid.hDiv).eq(t);if(a){var
r=Ye(".s-ico",i),o=Ye(".colmenu",i);try{Ye("[id^=jqgh_]",i).empty().html(a).append(r).append(o)}catch(e){}e.p.colNames[t]=a,e.p.frozenColumns&&(i=Ye("tr.ui-jqgrid-labels th",e.grid.fhDiv).eq(t),r=Ye(".s-ico",i),Ye("[id^=jqgh_]",i).empty().html(a).append(r))}s&&("string"==typeof
s?Ye(i).addClass(s):Ye(i).css(s)),"object"==typeof
l&&Ye(i).attr(l)}})},setSortIcon:function(s,l){return this.each(function(){var
e,t,i,r=this,o=-1,n=1;if(r.grid){Ye.jgrid.isNull(l)?n=r.p.colNames.length:o=isNaN(l)?Ye.jgrid.getElemByAttrVal(r.p.colModel,"name",l,!0):parseInt(l,10);for(var
a=0;a<n;a++)0<=o&&(a=o),"cb"!==(e=r.p.colModel[a].name)&&"subgrid"!==e&&"rn"!==e&&"sc"===e&&(e=Ye("tr.ui-jqgrid-labels th",r.grid.hDiv).eq(a),t=r.p.colNames[a],i=e.find(".s-ico"),"left"===s?e.find("div.ui-th-div").first().empty().addClass("ui-icon-left").append(i).append(t):"right"===s&&e.find("div.ui-th-div").first().empty().removeClass("ui-icon-left").append(t).append(i),r.p.frozenColumns)&&(e=Ye("tr.ui-jqgrid-labels th",r.grid.fhDiv).eq(a),t=r.p.colNames[a],i=e.find(".s-ico"),"left"===s?e.find("div.ui-th-div").first().empty().addClass("ui-icon-left").append(i).append(t):"right"===s&&e.find("div.ui-th-div").first().empty().removeClass("ui-icon-left").append(t).append(i))}})},setCell:function(a,s,l,d,c,p){return this.each(function(){var
e=this,t=-1;if(e.grid&&0<=(t=isNaN(s)?Ye.jgrid.getElemByAttrVal(e.p.colModel,"name",s,!0):parseInt(s,10))&&(r=Ye(e).jqGrid("getGridRowById",a))){var
i,r,o={},n=e.p.colModel[t];try{i=r.cells[t]}catch(e){}i&&(""===l&&!0!==p||((o=Ye(e).jqGrid("getRowData",a,"local"===e.p.datatype))[n.name]=l,r=e.formatter(a,l,t,o,"edit"),o=n.title?{title:Ye.jgrid.stripHtml(r)}:{},(e.p.treeGrid&&e.p.ExpandColumn===n.name?Ye("span",Ye(i)):Ye(i)).html(r).attr(o),"local"===e.p.datatype&&void
0!==(r=e.p._index[Ye.jgrid.stripPref(e.p.idPrefix,a)])&&(e.p.data[r][n.name]=l)),"string"==typeof
d?Ye(i).addClass(d):d&&Ye(i).css(d),"object"==typeof
c&&Ye(i).attr(c),e.p.frozenColumns)&&t<=e.p.frozenColCount&&(o=Ye(i).clone(),Ye("#"+a+" td","#"+Ye.jgrid.jqID(e.p.id+"_frozen")).eq(t).replaceWith(o))}})},getCell:function(r,o,n){var
a,s=!1;return"boolean"!=typeof
n&&(n=!1),this.each(function(){var
e,t=this,i=-1;if(t.grid&&0<=(i=isNaN(o)?Ye.jgrid.getElemByAttrVal(t.p.colModel,"name",o,!0):parseInt(o,10))&&(e=Ye(t).jqGrid("getGridRowById",r)))if(a=Ye("td",e).eq(i),n)s=a;else{try{s=Ye.unformat.call(t,a,{rowId:e.id,colModel:t.p.colModel[i]},i)}catch(e){s=Ye.jgrid.htmlDecode(a.html())}t.p.treeGrid&&s&&t.p.ExpandColumn===o&&(s=Ye("<div>"+s+"</div>").find("span").first().html())}}),s},getCol:function(a,s,l){var
d,c,p,u,g=[],h=0,f=("boolean"!=typeof
s&&(s=!1),void
0===l&&(l=!1),Ye.jgrid.getFont(this[0]));return this.each(function(){var
t=this,i=-1,e=t.p.colModel;if(t.grid&&0<=(i=isNaN(a)?Ye.jgrid.getElemByAttrVal(t.p.colModel,"name",a,!0):parseInt(a,10))){var
r=t.rows.length,o=0,n=0;if(r&&0<r){for(;o<r;o++)if(Ye(t.rows[o]).hasClass("jqgrow")&&"norecs"!==t.rows[o].id)if("maxwidth"===l)void
0===p&&(p=e[i].autosize_headers?e[i].canvas_width:0),p=Math.max(Ye.jgrid.getTextWidth(t.rows[o].cells[i].innerHTML,f),p);else{try{d=Ye.unformat.call(t,Ye(t.rows[o].cells[i]),{rowId:t.rows[o].id,colModel:t.p.colModel[i]},i)}catch(e){d=Ye.jgrid.htmlDecode(t.rows[o].cells[i].innerHTML)}l?(u=Ye.jgrid.floatNum(d),h+=u,void
0===p&&(p=c=u),c=Math.min(c,u),p=Math.max(p,u),n++):s?g.push({id:t.rows[o].id,value:d}):g.push(d)}if(l)switch(l.toLowerCase()){case"sum":g=h;break;case"avg":g=h/n;break;case"count":g=n;break;case"min":g=c;break;case"max":case"maxwidth":g=p}}}}),g},clearGridData:function(i,r){return this.each(function(){var
e,t=this;t.grid&&("boolean"!=typeof
i&&(i=!1),"boolean"!=typeof
r&&(r=!1),t.p.deepempty?Ye("#"+Ye.jgrid.jqID(t.p.id)+" tbody").first().find("tr").slice(1).remove():(e=Ye("#"+Ye.jgrid.jqID(t.p.id)+" tbody").first().find("tr").first()[0],Ye("#"+Ye.jgrid.jqID(t.p.id)+" tbody").first().empty().append(e)),t.p.footerrow&&i&&Ye(".ui-jqgrid-ftable td",t.grid.sDiv).html("&#160;"),t.p.headerrow&&r&&Ye(".ui-jqgrid-hrtable td",t.grid.hrDiv).html("&#160;"),t.p.selrow=null,t.p.selarrrow=[],t.p.savedRow=[],t.p.records=0,t.p.page=1,t.p.lastpage=0,t.p.reccount=0,t.p.data=[],t.p._index={},t.p.groupingView._locgr=!1,t.updatepager(!0,!1))})},getInd:function(e,t){var
i,r=!1;return this.each(function(){(i=Ye(this).jqGrid("getGridRowById",e))&&(r=!0===t?i:i.rowIndex)}),r},bindKeys:function(e){var
l=Ye.extend({onEnter:null,onSpace:null,onLeftKey:null,onRightKey:null,onSelectRow:!0,scrollingRows:!0},e||{});return this.each(function(){var
s=this;Ye("body").is("[role]")||Ye("body").attr("role","application"),s.p.scrollrows=l.scrollingRows,Ye(s).on("keydown",function(e){var
t,i,r=Ye(s).find("tr[tabindex=0]")[0],o=s.p.treeReader.expanded_field;if(r){var
n=s.p.selrow,a=s.p._index[Ye.jgrid.stripPref(s.p.idPrefix,r.id)];if(37===e.keyCode||38===e.keyCode||39===e.keyCode||40===e.keyCode){if(38===e.keyCode){if(t="",(i=r.previousSibling)&&Ye(i).hasClass("jqgrow")){if(Ye(i).is(":hidden")){for(;i;)if(i=i.previousSibling,!Ye(i).is(":hidden")&&Ye(i).hasClass("jqgrow")){t=i.id;break}}else
t=i.id;Ye(s).jqGrid("setSelection",t,l.onSelectRow,e)}Ye(s).triggerHandler("jqGridKeyUp",[t,n,e]),Ye.jgrid.isFunction(l.onUpKey)&&l.onUpKey.call(s,t,n,e),e.preventDefault()}if(40===e.keyCode){if(t="",(i=r.nextSibling)&&Ye(i).hasClass("jqgrow")){if(Ye(i).is(":hidden")){for(;i;)if(i=i.nextSibling,!Ye(i).is(":hidden")&&Ye(i).hasClass("jqgrow")){t=i.id;break}}else
t=i.id;Ye(s).jqGrid("setSelection",t,l.onSelectRow,e)}Ye(s).triggerHandler("jqGridKeyDown",[t,n,e]),Ye.jgrid.isFunction(l.onDownKey)&&l.onDownKey.call(s,t,n,e),e.preventDefault()}37===e.keyCode&&(s.p.treeGrid&&s.p.data[a][o]&&Ye(r).find("div.treeclick").trigger("click"),Ye(s).triggerHandler("jqGridKeyLeft",[s.p.selrow,e]),Ye.jgrid.isFunction(l.onLeftKey))&&l.onLeftKey.call(s,s.p.selrow,e),39===e.keyCode&&(s.p.treeGrid&&!s.p.data[a][o]&&Ye(r).find("div.treeclick").trigger("click"),Ye(s).triggerHandler("jqGridKeyRight",[s.p.selrow,e]),Ye.jgrid.isFunction(l.onRightKey))&&l.onRightKey.call(s,s.p.selrow,e)}else
13===e.keyCode?(Ye(s).triggerHandler("jqGridKeyEnter",[s.p.selrow,e]),Ye.jgrid.isFunction(l.onEnter)&&l.onEnter.call(s,s.p.selrow,e)):32===e.keyCode&&(Ye(s).triggerHandler("jqGridKeySpace",[s.p.selrow,e]),Ye.jgrid.isFunction(l.onSpace))&&l.onSpace.call(s,s.p.selrow,e)}}).on("click",function(e){Ye(e.target).is("input, textarea, select")||Ye(e.target,s.rows).closest("tr.jqgrow").focus()})})},unbindKeys:function(){return this.each(function(){Ye(this).off("keydown")})},getLocalRow:function(e){var
t,i=!1;return this.each(function(){void
0!==e&&0<=(t=this.p._index[Ye.jgrid.stripPref(this.p.idPrefix,e)])&&(i=this.p.data[t])}),i},progressBar:function(o){return o=Ye.extend({htmlcontent:"",method:"hide",loadtype:"disable"},o||{}),this.each(function(){var
e,t="show"===o.method,i=Ye("#load_"+Ye.jgrid.jqID(this.p.id)),r=Ye(window).scrollTop();switch(""!==o.htmlcontent&&i.html(o.htmlcontent),o.loadtype){case"disable":break;case"enable":i.toggle(t);break;case"block":Ye("#lui_"+Ye.jgrid.jqID(this.p.id)).css(t?{top:0,left:0,height:Ye("#gbox_"+Ye.jgrid.jqID(this.p.id)).height(),width:Ye("#gbox_"+Ye.jgrid.jqID(this.p.id)).width(),"z-index":1e4,position:"absolute"}:{}).toggle(t),i.toggle(t)}i.is(":visible")&&(e=i.offsetParent(),i.css("top",""),i.offset().top<r)&&(r=Math.min(10+r-e.offset().top,e.height()-i.height()),i.css("top",r+"px"))})},getColProp:function(e){var
t=this[0];return!!t.grid&&Ye.jgrid.getElemByAttrVal(t.p.colModel,"name",e,!1)},setColProp:function(t,i){return this.each(function(){var
e;this.grid&&Ye.isPlainObject(i)&&0<=(e=Ye.jgrid.getElemByAttrVal(this.p.colModel,"name",t,!0))&&Ye.extend(!0,this.p.colModel[e],i)})},sortGrid:function(n,a,s){return this.each(function(){var
e,t,i=this,r=-1,o=!1;if(i.grid){for(n=n||i.p.sortname,e=0;e<i.p.colModel.length;e++)if(i.p.colModel[e].index===n||i.p.colModel[e].name===n){r=e,!0===i.p.frozenColumns&&!0===i.p.colModel[e].frozen&&(o=i.grid.fhDiv.find("#"+i.p.id+"_"+n));break}-1!==r&&(t=i.p.colModel[r].sortable,o=o||i.grid.headers[r].el,"boolean"!=typeof
a&&(a=!1),t="boolean"!=typeof
t||t)&&i.sortData("jqgh_"+i.p.id+"_"+n,r,a,s,o)}})},setGridState:function(r){return this.each(function(){var
e,t,i;this.grid&&(t=Ye(e=this).jqGrid("getStyleUI",this.p.styleUI+".base","icon_caption_open",!0),i=Ye(this).jqGrid("getStyleUI",this.p.styleUI+".base","icon_caption_close",!0),"hidden"===r?(Ye(".ui-jqgrid-bdiv, .ui-jqgrid-hdiv","#gview_"+Ye.jgrid.jqID(e.p.id)).slideUp("fast"),e.p.pager&&Ye(e.p.pager).slideUp("fast"),e.p.toppager&&Ye(e.p.toppager).slideUp("fast"),!0===e.p.toolbar[0]&&("both"===e.p.toolbar[1]&&Ye(e.grid.ubDiv).slideUp("fast"),Ye(e.grid.uDiv).slideUp("fast")),e.p.footerrow&&Ye(".ui-jqgrid-sdiv","#gbox_"+Ye.jgrid.jqID(e.p.id)).slideUp("fast"),e.p.headerrow&&Ye(".ui-jqgrid-hrdiv","#gbox_"+Ye.jgrid.jqID(e.p.id)).slideUp("fast"),Ye(".ui-jqgrid-headlink",e.grid.cDiv).removeClass(t).addClass(i),e.p.gridstate="hidden"):"visible"===r&&(Ye(".ui-jqgrid-hdiv, .ui-jqgrid-bdiv","#gview_"+Ye.jgrid.jqID(e.p.id)).slideDown("fast"),e.p.pager&&Ye(e.p.pager).slideDown("fast"),e.p.toppager&&Ye(e.p.toppager).slideDown("fast"),!0===e.p.toolbar[0]&&("both"===e.p.toolbar[1]&&Ye(e.grid.ubDiv).slideDown("fast"),Ye(e.grid.uDiv).slideDown("fast")),e.p.footerrow&&Ye(".ui-jqgrid-sdiv","#gbox_"+Ye.jgrid.jqID(e.p.id)).slideDown("fast"),e.p.headerrow&&Ye(".ui-jqgrid-hrdiv","#gbox_"+Ye.jgrid.jqID(e.p.id)).slideDown("fast"),Ye(".ui-jqgrid-headlink",e.grid.cDiv).removeClass(i).addClass(t),e.p.gridstate="visible"))})},setFrozenColumns:function(){return this.each(function(){if(this.grid){var
e,t,i,r,o,n,a,s=this,l=s.p.colModel,d=0,c=l.length,p=Ye(s).jqGrid("getStyleUI",s.p.styleUI+".base","headerDiv",!0,"ui-jqgrid-hdiv"),u=Ye(s).jqGrid("getStyleUI",s.p.styleUI+".common","hover",!0),g="border-box"===Ye("#gbox_"+Ye.jgrid.jqID(s.p.id)).css("box-sizing")?1:0;if(!0!==s.p.subGrid&&!0!==s.p.treeGrid&&!0!==s.p.cellEdit&&!s.p.scroll&&!s.p.frozenColumns){for(s.p.frozenColCount=-1;d<c&&!0===l[d].frozen;)s.p.frozenColCount=d,d++;0<=s.p.frozenColCount&&(a=Ye(".ui-jqgrid-hdiv","#gview_"+Ye.jgrid.jqID(s.p.id)).height(),e=Ye(".ui-jqgrid-bdiv","#gview_"+Ye.jgrid.jqID(s.p.id)).position(),t=Ye(".ui-jqgrid-hdiv","#gview_"+Ye.jgrid.jqID(s.p.id)).position(),s.grid.fhDiv=Ye('<div style="position:absolute;'+("rtl"===s.p.direction?"right:0px;":"left:0px;")+"top:"+t.top+"px;height:"+(a-g)+'px;" class="frozen-div '+p+'"></div>'),s.grid.fbDiv=Ye('<div style="position:absolute;'+("rtl"===s.p.direction?"right:0px;":"left:0px;")+"top:"+e.top+'px;overflow-y:hidden" class="frozen-bdiv ui-jqgrid-bdiv"></div>'),Ye("#gview_"+Ye.jgrid.jqID(s.p.id)).append(s.grid.fhDiv),t=Ye(".ui-jqgrid-htable","#gview_"+Ye.jgrid.jqID(s.p.id)).clone(!0),Ye(t).width(1),Ye(s.grid.fhDiv).append(t),Ye(s).jqGrid("isGroupHeaderOn")?(Ye("tr.jqg-third-row-header",s.grid.hDiv).height(),Ye("tr.jqg-first-row-header, tr.jqg-third-row-header",t).each(function(){Ye("th",this).slice(s.p.frozenColCount+1).remove()}),r=i=-1,Ye("tr.jqg-second-row-header th",t).each(function(){if(o=parseInt(Ye(this).attr("colspan"),10),parseInt(Ye(this).attr("rowspan"),10)&&(i++,r++),o&&(i+=o,r++),i===s.p.frozenColCount)return r=s.p.frozenColCount,!1}),i!==s.p.frozenColCount&&(r=s.p.frozenColCount),Ye("tr.jqg-second-row-header",t).each(function(){Ye("th",this).slice(r+1).remove()})):(n=[],Ye("#gview_"+Ye.jgrid.jqID(s.p.id)+" .ui-jqgrid-htable > thead >tr").each(function(e,t){n.push(parseInt(Ye(this).height(),10))}),Ye("thead >tr",t).each(function(){Ye("th",this).slice(s.p.frozenColCount+1).remove()}),Ye("thead >tr",t).each(function(e){0===e&&--n[e],Ye(this).height(n[e])})),(a=Ye("tr.jqg-second-row-header th",t).filter(function(){return"none"!==Ye(this).css("display")}).first())&&""===Ye.jgrid.trim(a.text())&&a.html("&nbsp;"),(a=Ye("tr.jqg-third-row-header th",t).filter(function(){return"none"!==Ye(this).css("display")}).first())&&""===Ye.jgrid.trim(a.text())&&Ye("div",a).prepend("&nbsp;"),Ye.jgrid.msie()||Ye(t).css("height","100%"),Ye(s.grid.fhDiv).mousemove(function(e){if(s.grid.resizing)return s.grid.dragMove(e),!1}),s.p.sortable&&Ye.fn.sortable&&Ye(s.grid.fhDiv).find("tr.ui-jqgrid-labels th").addClass("sortable-disabled"),s.p.headerrow&&(s.grid.fhrDiv=Ye('<div style="position:absolute;'+("rtl"===s.p.direction?"right:0px;":"left:0px;")+'top:0px;" class="frozen-hrdiv ui-jqgrid-hrdiv "></div>'),Ye("#gview_"+Ye.jgrid.jqID(s.p.id)).append(s.grid.fhrDiv)),s.p.footerrow&&(s.grid.fsDiv=Ye('<div style="position:absolute;'+("rtl"===s.p.direction?"right:0px;":"left:0px;")+'top:0px;" class="frozen-sdiv ui-jqgrid-sdiv"></div>'),Ye("#gview_"+Ye.jgrid.jqID(s.p.id)).append(s.grid.fsDiv)),Ye("#gview_"+Ye.jgrid.jqID(s.p.id)).append(s.grid.fbDiv),Ye(s.grid.fbDiv).on("mousewheel DOMMouseScroll",function(e){var
t=Ye(s.grid.bDiv).scrollTop();0<e.originalEvent.wheelDelta||e.originalEvent.detail<0?Ye(s.grid.bDiv).scrollTop(t-25):Ye(s.grid.bDiv).scrollTop(t+25),e.preventDefault()}),!0===s.p.hoverrows&&Ye("#"+Ye.jgrid.jqID(s.p.id)).off("mouseover mouseout"),Ye(s).on("jqGridAfterGridComplete.setFrozenColumns",function(){Ye("#"+Ye.jgrid.jqID(s.p.id)+"_frozen").remove(),Ye(s.grid.fbDiv).height(Ye(s.grid.bDiv)[0].clientHeight);var
e,i=[],t=(Ye("#"+Ye.jgrid.jqID(s.p.id)+" tr[role=row].jqgrow").each(function(){i.push(Ye(this).height())}),Ye("#"+Ye.jgrid.jqID(s.p.id)).clone(!0));Ye("tr[role=row]",t).each(function(){Ye("td[role=gridcell]",this).slice(s.p.frozenColCount+1).remove()}),Ye(t).width(1).attr("id",s.p.id+"_frozen"),Ye(s.grid.fbDiv).append(t),Ye("tr[role=row].jqgrow",t).each(function(e,t){Ye(this).height(i[e])}),s.rows[1]&&"norecs"===s.rows[1].id&&Ye("#norecs td",t).html(""),Ye(s.grid.fbDiv)[0].scrollTop=Ye(s.grid.bDiv)[0].scrollTop,!0===s.p.hoverrows&&(Ye("tr.jqgrow",t).hover(function(){Ye(this).addClass(u),Ye("#"+Ye.jgrid.jqID(this.id),"#"+Ye.jgrid.jqID(s.p.id)).addClass(u)},function(){Ye(this).removeClass(u),Ye("#"+Ye.jgrid.jqID(this.id),"#"+Ye.jgrid.jqID(s.p.id)).removeClass(u)}),Ye("tr.jqgrow","#"+Ye.jgrid.jqID(s.p.id)).hover(function(){Ye(this).addClass(u),Ye("#"+Ye.jgrid.jqID(this.id),"#"+Ye.jgrid.jqID(s.p.id)+"_frozen").addClass(u)},function(){Ye(this).removeClass(u),Ye("#"+Ye.jgrid.jqID(this.id),"#"+Ye.jgrid.jqID(s.p.id)+"_frozen").removeClass(u)})),s.p.headerrow&&(t=Ye(s.grid.hrDiv).position(),Ye("table",s.grid.fhrDiv).remove(),e=Ye(".ui-jqgrid-hrtable","#gview_"+Ye.jgrid.jqID(s.p.id)).clone(!0),Ye("tr",e).each(function(){Ye("td",this).slice(s.p.frozenColCount+1).remove()}),Ye(e).width(1),Ye(s.grid.fhrDiv).css("top",t.top+"px").append(e)),s.p.footerrow&&(t=Ye(s.grid.sDiv).position(),Ye("table",s.grid.fsDiv).remove(),e=Ye(".ui-jqgrid-ftable","#gview_"+Ye.jgrid.jqID(s.p.id)).clone(!0),Ye("tr",e).each(function(){Ye("td",this).slice(s.p.frozenColCount+1).remove()}),Ye(e).width(1),Ye(s.grid.fsDiv).css("top",t.top+"px").append(e))}),s.grid.hDiv.loading||Ye(s).triggerHandler("jqGridAfterGridComplete.setFrozenColumns"),s.p.frozenColumns=!0,Ye(s).triggerHandler("onFrozenColumnsCall"))}}})},destroyFrozenColumns:function(){return this.each(function(){var
e,t,i;this.grid&&!0===this.p.frozenColumns&&(t=Ye(e=this).jqGrid("getStyleUI",e.p.styleUI+".common","hover",!0),Ye(e.grid.fhDiv).remove(),Ye(e.grid.fbDiv).remove(),e.grid.fhDiv=null,e.grid.fbDiv=null,e.p.footerrow&&(Ye(e.grid.fsDiv).remove(),e.grid.fsDiv=null),e.p.headerrow&&(Ye(e.grid.fhrDiv).remove(),e.grid.fhrDiv=null),Ye(this).off(".setFrozenColumns"),!0===e.p.hoverrows&&Ye("#"+Ye.jgrid.jqID(e.p.id)).on({mouseover:function(e){i=Ye(e.target).closest("tr.jqgrow"),"ui-subgrid"!==Ye(i).attr("class")&&Ye(i).addClass(t)},mouseout:function(e){i=Ye(e.target).closest("tr.jqgrow"),Ye(i).removeClass(t)}}),this.p.frozenColumns=!1,this.p.frozenColCount=-1)})},resizeColumn:function(a,s,l,d){return this.each(function(){var
e,t,i=this.grid,r=this.p,o=r.colModel,n=o.length;if("boolean"!=typeof
l&&(l=!1),"boolean"!=typeof
d&&(d=!0),"string"==typeof
a){for(e=0;e<n;e++)if(o[e].name===a){a=e;break}}else
a=parseInt(a,10);if((o[a].resizable||l)&&(s=parseInt(s,10),!("number"!=typeof
a||a<0||a>o.length-1||"number"!=typeof
s||s<r.minColWidth))){if(r.forceFit)for(r.nv=0,e=a+1;e<n;e++)if(!0!==o[e].hidden){r.nv=e-a;break}if(i.resizing={idx:a},t=s-i.headers[a].width,r.forceFit){if(i.headers[a+r.nv].width-t<r.minColWidth)return;i.headers[a+r.nv].newWidth=i.headers[a+r.nv].width-t}i.newWidth=r.tblwidth+t,i.headers[a].newWidth=s,i.dragEnd(!1,d)}})},getStyleUI:function(e,t,i,r){var
o="",n="";try{var
a=e.split(".");switch(i||(o="class=",n='"'),Ye.jgrid.isNull(r)&&(r=""),a.length){case
1:o+=n+Ye.jgrid.trim(r+" "+Ye.jgrid.styleUI[a[0]][t]+n);break;case
2:o+=n+Ye.jgrid.trim(r+" "+Ye.jgrid.styleUI[a[0]][a[1]][t]+n)}}catch(e){o=""}return o},resizeGrid:function(e,d,c,p){return this.each(function(){var
s=this,l=!1;void
0===e&&(e=500),"boolean"!=typeof
d&&(d=!0),"boolean"!=typeof
c&&(c=!0),"boolean"!=typeof
p&&(p=!0),setTimeout(function(){try{var
e,t,i,r,o,n,a;s.p.frozenColumns&&p&&(Ye("#"+Ye.jgrid.jqID(s.p.id)).jqGrid("destroyFrozenColumns"),l=!0),d&&(e=Ye(window).width(),t=Ye("#gbox_"+Ye.jgrid.jqID(s.p.id)).parent().width(),i=s.p.width,i=3<e-t?t:e,Ye(s.grid.bDiv).css("max-height")&&["100%","auto"].includes(s.p.height)&&Ye(s.grid.bDiv).height()<Ye(s).height()?Ye("#"+Ye.jgrid.jqID(s.p.id)).jqGrid("setGridWidth",i+s.p.scrollOffset-2,!1,!1):Ye("#"+Ye.jgrid.jqID(s.p.id)).jqGrid("setGridWidth",i,s.p.shrinkToFit,!1)),"auto"!==s.p.height&&"100%"!==s.p.height&&c&&(a=s.p.height,r=-1===s.p.styleUI.search("Bootstrap")||isNaN(s.p.height)?0:2,a=3<(o=Ye(window).height())-(n=Ye("#gbox_"+Ye.jgrid.jqID(s.p.id)).parent().height())?n:o,Ye("#"+Ye.jgrid.jqID(s.p.id)).jqGrid("setGridHeight",a-r,!0,!1)),l&&Ye("#"+Ye.jgrid.jqID(s.p.id)).jqGrid("setFrozenColumns")}catch(e){}},e)})},colMenuAdd:function(e,t){var
i=this[0].p.styleUI,i=Ye.jgrid.styleUI[i].colmenu;return t=Ye.extend({title:"Item",icon:i.icon_new_item,funcname:null,position:"last",closeOnRun:!0,exclude:"",id:null},t||{}),this.each(function(){t.colname="all"===e?"_all_":e;t.id=Ye.jgrid.isNull(t.id,!0)?Ye.jgrid.randId():t.id,this.p.colMenuCustom[t.id]=t})},colMenuDelete:function(e){return this.each(function(){this.p.colMenuCustom.hasOwnProperty(e)&&delete
this.p.colMenuCustom[e]})},menubarAdd:function(o){var
i,n,e=this[0].p.styleUI,a=Ye.jgrid.styleUI[e].common;return this.each(function(){var
r=this;if(Array.isArray(o))for(var
e=0;e<o.length;e++){(i=o[e]).id||(i.id=Ye.jgrid.randId());var
t="";i.icon&&(t='<span class="'+a.icon_base+" "+i.icon+'"></span>'),i.position||(i.position="last"),i.closeoncall||(i.closeoncall=!0),i.divider?(n='<li class="ui-menu-item divider" role="separator"></li>',i.cick=null):n='<li class="ui-menu-item" role="presentation"><a id="'+i.id+'" class="g-menu-item" tabindex="0" role="menuitem" ><table class="ui-common-table"><tr><td class="menu_icon">'+t+'</td><td class="menu_text">'+i.title+"</td></tr></table></a></li>","last"===i.position?Ye("#"+this.p.id+"_menubar").append(n):Ye("#"+this.p.id+"_menubar").prepend(n)}Ye("li a","#"+this.p.id+"_menubar").each(function(e,i){Ye(o).each(function(e,t){if(t.id===i.id&&Ye.jgrid.isFunction(t.click))return Ye(i).on("click",function(e){t.click.call(r,e)}),!1}),Ye(this).hover(function(e){Ye(this).addClass(a.hover),e.stopPropagation()},function(e){Ye(this).removeClass(a.hover)})})})},menubarDelete:function(e){return this.each(function(){Ye("#"+e,"#"+this.p.id+"_menubar").remove()})},addColSearchMenu:function(){return this.each(function(){var
e=this;Ye(e).colMenuAdd("sc",{title:"Reset",position:"first",id:"reset",funcname:function(){Ye("input[id^='jqs_']","#"+this.p.id).each(function(e){Ye(this).val("")}),Ye(this)[0].p._results={},Ye(this).jqGrid("showCol",this.p._avc)}}),Ye(e).colMenuAdd("sc",{separator:!0,id:"groupOp"}),Ye(e).colMenuAdd("sc",{separator:!0,id:"operOp"}),Ye(e).colMenuAdd("sc",{separator:!0,id:"close",funcname:function(){return!0}}),Ye(e).on("jqGridcolMenuBeforeProcess.custom",function(e,t){if("custom"===t.module&&"sc"===t.column){var
i,r=Ye.jgrid.getRegional(this,"search"),o=this.p.searchColOptions,n=Ye.jgrid.getMethod("getStyleUI"),a=this.p.styleUI+".base";if("reset"===t.action.id&&(t.action.title=r.Reset||"Reset",t.action.icon=n(this.p.styleUI+".colmenu","icon_reset",!0,"")),"close"===t.action.id&&(t.action.title=r.Close||"Close",t.action.icon=n(this.p.styleUI+".colmenu","icon_close",!0,"")),"groupOp"===t.action.id){i=n(a,"searchSelect",!1,"search-col-input"),t.action.title=""+(r.Operand||"Operand: "),t.action.title+="<select data-grid-id="+this.p.id+' id="opselect"  '+i+">",i=n(this.p.styleUI+".colmenu","icon_group_op",!0,""),t.action.icon=i;for(var
s=0;s<r.groupOps.length;s++){var
l=o.searchOp===r.groupOps[s].op?"selected":"";t.action.title+='<option value="'+r.groupOps[s].op+'" '+l+">"+r.groupOps[s].text+"</option>"}t.action.title+="</select>",setTimeout(function(){Ye("#opselect").on("change",function(){var
e=Ye("#"+Ye(this).attr("data-grid-id"))[0];e.p.searchColOptions.searchOp=Ye(this).val(),Ye.jgrid.myfunc(e.p.id)})},200)}if("operOp"===t.action.id){i=n(a,"searchSelect",!1,"search-col-input"),t.action.title=r.Operation||"Oper : ",t.action.title+="<select data-grid-id="+this.p.id+' id="selectoper"  '+i+">",i=n(this.p.styleUI+".colmenu","icon_oper_op",!0,""),t.action.icon=i;for(s=0;s<r.odata.length;s++){l=o.operand===r.odata[s].oper?"selected":"";o.aOperands.includes(r.odata[s].oper)&&(t.action.title+='<option value="'+r.odata[s].oper+'" '+l+">"+r.odata[s].text+"</option>")}t.action.title+="</select>",setTimeout(function(){Ye("#selectoper").on("change",function(){var
e=Ye("#"+Ye(this).attr("data-grid-id"))[0];e.p.searchColOptions.operand=Ye(this).val(),Ye.jgrid.myfunc(e.p.id)})},200)}}})})},disableColMenu:function(e){return this.each(function(){Ye(this.grid.hDiv).find("tr #jqgh_"+this.p.id+"_"+e+" > .colmenu").css("display","none")})},enableColMenu:function(e){return this.each(function(){Ye(this.grid.hDiv).find("tr #jqgh_"+this.p.id+"_"+e+" > .colmenu").css("display","inline")})}})});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.base"],e):e(jQuery)}(function(G){"use strict";G.jgrid.extend({editCell:function(c,u,f,g,C){return this.each(function(){var
e,i,l,t,r=this,o=G(this).jqGrid("getStyleUI",r.p.styleUI+".common","highlight",!0),d=r.p.ariaBody?"":G(this).jqGrid("getStyleUI",r.p.styleUI+".common","hover",!0),s=G(this).jqGrid("getStyleUI",r.p.styleUI+".celledit","inputClass",!0),a=G(this).jqGrid("getStyleUI",r.p.styleUI+".celledit","selectClass",!0);if(r.grid&&!0===r.p.cellEdit){if(u=parseInt(u,10),r.p.selrow=r.rows[c].id,r.p.knv||r.p.ariaBody||G(r).jqGrid("GridNav"),0<r.p.savedRow.length){if(!0===f&&c==r.p.iRow&&u==r.p.iCol)return;G(r).jqGrid("saveCell",r.p.savedRow[0].id,r.p.savedRow[0].ic)}else
window.setTimeout(function(){G("#"+G.jgrid.jqID(r.p.knv)).attr("tabindex","-1").focus()},1);if("subgrid"!==(e=(t=r.p.colModel[u]).name)&&"cb"!==e&&"rn"!==e&&"sc"!==e){try{l=G(r.rows[c].cells[u])}catch(e){l=G("td",r.rows[c]).eq(u)}if(0<=parseInt(r.p.iCol,10)&&0<=parseInt(r.p.iRow,10)&&void
0!==r.p.iRowId&&(n=G(r).jqGrid("getGridRowById",r.p.iRowId),G(n).removeClass("selected-row "+d).find("td").eq(r.p.iCol).removeClass("edit-cell "+o)),l.addClass("edit-cell "+o),G(r.rows[c]).addClass("selected-row "+d),!0!==t.editable||!0!==f||l.hasClass("not-editable-cell")||G.jgrid.isFunction(r.p.isCellEditable)&&!r.p.isCellEditable.call(r,e,c,u))i=l.html().replace(/\&#160\;/gi,""),G(r).triggerHandler("jqGridCellSelect",[r.rows[c].id,u,i,g]),G.jgrid.isFunction(r.p.onCellSelect)&&r.p.onCellSelect.call(r,r.rows[c].id,u,i,g);else{try{i=G.unformat.call(r,l,{rowId:r.rows[c].id,colModel:t},u)}catch(e){i=t.edittype&&"textarea"===t.edittype?l.text():l.html()}r.p.autoencode&&(i=G.jgrid.htmlDecode(i)),t.edittype||(t.edittype="text"),r.p.savedRow.push({id:c,ic:u,name:e,v:i,rowId:r.rows[c].id}),("&nbsp;"===i||"&#160;"===i||1===i.length&&160===i.charCodeAt(0))&&(i=""),G.jgrid.isFunction(r.p.formatCell)&&void
0!==(n=r.p.formatCell.call(r,r.rows[c].id,e,i,c,u))&&(i=n),G(r).triggerHandler("jqGridBeforeEditCell",[r.rows[c].id,e,i,c,u]),G.jgrid.isFunction(r.p.beforeEditCell)&&r.p.beforeEditCell.call(r,r.rows[c].id,e,i,c,u);var
n,o=G.extend({},t.editoptions||{},{id:c+"_"+e,name:e,rowId:r.rows[c].id,oper:"edit",module:"cell"}),p=(C&&(i=g.key),G.jgrid.createEl.call(r,t.edittype,o,i,!0,G.extend({},G.jgrid.ajaxOptions,r.p.ajaxSelectOptions||{})));-1<G.inArray(t.edittype,["text","textarea","password"])?G(p).addClass(s):"select"===t.edittype&&G(p).addClass(a),l.html("").append(p).attr("tabindex","0"),G.jgrid.bindEv.call(r,p,o),window.setTimeout(function(){G(p).focus()},1),G("input, select, textarea",l).on("keydown",function(e){var
i=e.key;if(27===e.keyCode&&(!(0<G("input.hasDatepicker",l).length)||G(".ui-datepicker").is(":hidden")?G(r).jqGrid("restoreCell",c,u):G("input.hasDatepicker",l).datepicker("hide")),13===e.keyCode&&e.altKey&&"TEXTAREA"===this.nodeName)return this.value=this.value+"\r",!0;if(13===e.keyCode&&!e.shiftKey)return G(r).jqGrid("saveCell",c,u),c<r.rows.length-1&&C&&G(r).jqGrid("focusBodyCell",c+1,u),!1;if(9===e.keyCode&&!C){if(r.grid.hDiv.loading)return!1;e.shiftKey?r.p.ariaBody?(G(r).jqGrid("saveCell",c,u),1<u&&G(r).jqGrid("focusBodyCell",c,u-1)):!G(r).jqGrid("prevCell",c,u,e)&&r.p.editNextRowCell&&0<c-1&&r.rows[c-1]&&(c--,G(r).jqGrid("prevCell",c,r.p.colModel.length,e)):r.p.ariaBody?(G(r).jqGrid("saveCell",c,u),u<r.p.colModel.length-1&&G(r).jqGrid("focusBodyCell",c,u+1)):!G(r).jqGrid("nextCell",c,u,e)&&r.p.editNextRowCell&&r.rows[c+1]&&(c++,G(r).jqGrid("nextCell",c,0,e))}!C&&r.p.F2key&&r.p.ariaBody&&"F2"===e.key&&(G(r).jqGrid("saveCell",c,u),G(r).jqGrid("focusBodyCell",c,u),r.p.F2key=!1),C&&("ArrowUp"===i&&(G(r).jqGrid("saveCell",c,u),1<c)&&G(r).jqGrid("focusBodyCell",c-1,u),"ArrowDown"===i&&(G(r).jqGrid("saveCell",c,u),c<r.p.rows.length-1)&&G(r).jqGrid("focusBodyCell",c+1,u),"ArrowLeft"===i&&(G(r).jqGrid("saveCell",c,u),1<u)&&G(r).jqGrid("focusBodyCell",c,u-1),"ArrowRight"===i&&(G(r).jqGrid("saveCell",c,u),u<r.p.colModel.length-1)&&G(r).jqGrid("focusBodyCell",c,u+1),9===e.keyCode)&&(G(r).jqGrid("saveCell",c,u),e.shiftKey?1<u&&G(r).jqGrid("focusBodyCell",c,u-1):u<r.p.colModel.length-1&&G(r).jqGrid("focusBodyCell",c,u+1)),e.stopPropagation()}),G(r).triggerHandler("jqGridAfterEditCell",[r.rows[c].id,e,i,c,u]),G.jgrid.isFunction(r.p.afterEditCell)&&r.p.afterEditCell.call(r,r.rows[c].id,e,i,c,u)}r.p.iCol=u,r.p.iRow=c,r.p.iRowId=r.rows[c].id}}})},saveCell:function(b,q,m){return this.each(function(){var
t=this,e=t.p.colModel[q],r=e.name,o=G(t).jqGrid("getGridRowById",t.rows[b].id),d=G("td",o).eq(q),s=(void
0!==m&&(g=G.unformat.call(t,d,{rowId:t.rows[b].id,colModel:e},q),t.p.savedRow.push({id:b,ic:q,name:r,v:g,rowId:t.rows[b].id}),t.p.savedValues={oldvalue:g,newvalue:m,indexRow:b}),1<=t.p.savedRow.length?0:null),a=G.jgrid.getRegional(this,"errors"),n=G.jgrid.getRegional(this,"edit");if(t.grid&&!0===t.p.cellEdit){if(null!==s){var
p=G.jgrid.jqID(r),c=G(d).offset();if(void
0===m)switch(e.edittype){case"select":var
l,u,f=e.editoptions.multiple?(i=G("#"+b+"_"+p,o),l=[],(u=G(i).val())?u.join(","):u="",G("option:selected",i).each(function(e,i){l[e]=G(i).text()}),l.join(",")):(u=G("#"+b+"_"+p+" option:selected",o).val(),G("#"+b+"_"+p+" option:selected",o).text());e.formatter&&(f=u);break;case"checkbox":var
i=["Yes","No"];e.editoptions&&e.editoptions.value&&(i=e.editoptions.value.split(":")),u=G("#"+b+"_"+p,o).is(":checked")?i[0]:i[1],f=u;break;case"password":case"text":case"textarea":case"button":u=G("#"+b+"_"+p,o).val(),f=u;break;case"custom":try{if(!e.editoptions||!G.jgrid.isFunction(e.editoptions.custom_value))throw"e1";if(void
0===(u=e.editoptions.custom_value.call(t,G(".customelement",d),"get")))throw"e2";f=u}catch(e){"e1"===e?G.jgrid.info_dialog(a.errcap,"function 'custom_value' "+n.msg.nodefined,n.bClose,{styleUI:t.p.styleUI}):"e2"===e?G.jgrid.info_dialog(a.errcap,"function 'custom_value' "+n.msg.novalue,n.bClose,{styleUI:t.p.styleUI}):G.jgrid.info_dialog(a.errcap,e.message,n.bClose,{styleUI:t.p.styleUI})}}else{if(!0!==e.editable||d.hasClass("not-editable-cell")||G.jgrid.isFunction(t.p.isCellEditable)&&!t.p.isCellEditable.call(t,r,b,q))return f=u=m,void
t.p.savedRow.splice(0,1);f=u=m}if(f!==t.p.savedRow[s].v){var
g=G(t).triggerHandler("jqGridBeforeSaveCell",[t.p.savedRow[s].rowId,r,u,b,q]),C=(g&&(f=u=g),G.jgrid.isFunction(t.p.beforeSaveCell)&&(g=t.p.beforeSaveCell.call(t,t.p.savedRow[s].rowId,r,u,b,q))&&(f=u=g),G.jgrid.checkValues.call(t,u,q)),v=!1;if(!0===C[0]){var
g=G(t).triggerHandler("jqGridBeforeSubmitCell",[t.p.savedRow[s].rowId,r,u,b,q])||{},w=(G.jgrid.isFunction(t.p.beforeSubmitCell)&&(g=(g=t.p.beforeSubmitCell.call(t,t.p.savedRow[s].rowId,r,u,b,q))||{}),G(t).triggerHandler("jqGridOnSubmitCell",[t.p.savedRow[s].rowId,r,u,b,q]));if(void
0===w&&(w=!0),!1===(w=G.jgrid.isFunction(t.p.onSubmitCell)&&void
0===(w=t.p.onSubmitCell(t.p.savedRow[s].rowId,r,u,b,q))?!0:w))return;if(0<G("input.hasDatepicker",d).length&&G("input.hasDatepicker",d).datepicker("hide"),"remote"===t.p.cellsubmit)if(t.p.cellurl){var
h={},w=(t.p.autoencode&&(u=G.jgrid.htmlEncode(u)),e.editoptions&&e.editoptions.NullIfEmpty&&""===u&&(u="null",v=!0),h[r]=u,t.p.prmNames),j=w.id,y=w.oper;h[j]=G.jgrid.stripPref(t.p.idPrefix,t.p.savedRow[s].rowId),h[y]=w.editoper,h=G.extend(g,h),G(t).jqGrid("progressBar",{method:"show",loadtype:t.p.loadui,htmlcontent:G.jgrid.getRegional(t,"defaults.savetext")}),t.grid.hDiv.loading=!0,G.ajax(G.extend({url:t.p.cellurl,data:G.jgrid.isFunction(t.p.serializeCellData)?t.p.serializeCellData.call(t,h,r):h,type:"POST",complete:function(e,i){var
l;G(t).jqGrid("progressBar",{method:"hide",loadtype:t.p.loadui}),t.grid.hDiv.loading=!1,"success"===i&&(!0===(l=!0===(l=G(t).triggerHandler("jqGridAfterSubmitCell",[t,e,h[j],r,u,b,q])||[!0,""])[0]&&G.jgrid.isFunction(t.p.afterSubmitCell)?t.p.afterSubmitCell.call(t,e,h[j],r,u,b,q):l)[0]?(v&&(u=""),G(d).empty(),G(t).jqGrid("setCell",t.p.savedRow[s].rowId,q,f,!1,!1,!0),d=G("td",o).eq(q),G(d).addClass("dirty-cell"),G(o).addClass("edited"),G(t).triggerHandler("jqGridAfterSaveCell",[t.p.savedRow[s].rowId,r,u,b,q]),G.jgrid.isFunction(t.p.afterSaveCell)&&t.p.afterSaveCell.call(t,t.p.savedRow[s].rowId,r,u,b,q),t.p.savedRow.splice(0,1)):(G(t).triggerHandler("jqGridErrorCell",[e,i]),G.jgrid.isFunction(t.p.errorCell)?t.p.errorCell.call(t,e,i):G.jgrid.info_dialog(a.errcap,l[1],n.bClose,{styleUI:t.p.styleUI,top:c.top+30,left:c.left,onClose:function(){t.p.restoreCellonFail||G("#"+b+"_"+p,o).focus()}}),t.p.restoreCellonFail&&G(t).jqGrid("restoreCell",b,q)))},error:function(e,i,l){G("#lui_"+G.jgrid.jqID(t.p.id)).hide(),t.grid.hDiv.loading=!1,G(t).triggerHandler("jqGridErrorCell",[e,i,l]),G.jgrid.isFunction(t.p.errorCell)?t.p.errorCell.call(t,e,i,l):G.jgrid.info_dialog(a.errcap,e.status+" : "+e.statusText+"<br/>"+i,n.bClose,{styleUI:t.p.styleUI,top:c.top+30,left:c.left,onClose:function(){t.p.restoreCellonFail||G("#"+b+"_"+p,o).focus()}}),t.p.restoreCellonFail&&G(t).jqGrid("restoreCell",b,q)}},G.jgrid.ajaxOptions,t.p.ajaxCellOptions||{}))}else
try{G.jgrid.info_dialog(a.errcap,a.nourl,n.bClose,{styleUI:t.p.styleUI}),t.p.restoreCellonFail&&G(t).jqGrid("restoreCell",b,q)}catch(e){}"clientArray"===t.p.cellsubmit&&(G(d).empty(),G(t).jqGrid("setCell",t.p.savedRow[s].rowId,q,f,!1,!1,!0),d=G("td",o).eq(q),G(d).addClass("dirty-cell"),G(o).addClass("edited"),G(t).triggerHandler("jqGridAfterSaveCell",[t.p.savedRow[s].rowId,r,u,b,q]),G.jgrid.isFunction(t.p.afterSaveCell)&&t.p.afterSaveCell.call(t,t.p.savedRow[s].rowId,r,u,b,q),t.p.savedRow.splice(0,1))}else
try{G.jgrid.isFunction(t.p.validationCell)?t.p.validationCell.call(t,G("#"+b+"_"+p,o),C[1],b,q):(window.setTimeout(function(){G.jgrid.info_dialog(a.errcap,u+" "+C[1],n.bClose,{styleUI:t.p.styleUI,top:c.top+30,left:c.left,onClose:function(){t.p.restoreCellonFail||G("#"+b+"_"+p,o).focus()}})},50),t.p.restoreCellonFail&&G(t).jqGrid("restoreCell",b,q))}catch(e){alert(C[1])}}else
G(t).jqGrid("restoreCell",b,q)}window.setTimeout(function(){G("#"+G.jgrid.jqID(t.p.knv)).attr("tabindex","-1").focus(),t.p.ariaBody&&G(t).jqGrid("focusBodyCell",t.p.iRow,t.p.iCol)},0)}})},restoreCell:function(t,r){return this.each(function(){var
e=this,i=1<=e.p.savedRow.length?0:null;if(e.grid&&!0===e.p.cellEdit){if(null!==i){var
l=G(e).jqGrid("getGridRowById",e.p.savedRow[i].rowId),l=G("td",l).eq(r);if(G.jgrid.isFunction(G.fn.datepicker))try{G("input.hasDatepicker",l).datepicker("hide")}catch(e){}G(l).empty().attr("tabindex","-1"),G(e).jqGrid("setCell",e.p.savedRow[0].rowId,r,e.p.savedRow[i].v,!1,!1,!0),G(e).triggerHandler("jqGridAfterRestoreCell",[e.p.savedRow[i].rowId,e.p.savedRow[i].v,t,r]),G.jgrid.isFunction(e.p.afterRestoreCell)&&e.p.afterRestoreCell.call(e,e.p.savedRow[i].rowId,e.p.savedRow[i].v,t,r),e.p.savedRow.splice(0,1)}window.setTimeout(function(){G("#"+e.p.knv).attr("tabindex","-1").focus(),e.p.ariaBody&&G(e).jqGrid("focusBodyCell",e.p.iRow,e.p.iCol)},0)}})},nextCell:function(t,r,o){var
d;return this.each(function(){var
e,i=this,l=!1;if(i.grid&&!0===i.p.cellEdit){for(e=r+1;e<i.p.colModel.length;e++)if(!0===i.p.colModel[e].editable&&(!G.jgrid.isFunction(i.p.isCellEditable)||i.p.isCellEditable.call(i,i.p.colModel[e].name,t,e))){l=e;break}!1!==l?(d=!0,G(i).jqGrid("editCell",t,l,!0,o)):(d=!1,0<i.p.savedRow.length&&G(i).jqGrid("saveCell",t,r))}}),d},prevCell:function(t,r,o){var
d;return this.each(function(){var
e,i=this,l=!1;if(!i.grid||!0!==i.p.cellEdit)return!1;for(e=r-1;0<=e;e--)if(!0===i.p.colModel[e].editable&&(!G.jgrid.isFunction(i.p.isCellEditable)||i.p.isCellEditable.call(i,i.p.colModel[e].name,t,e))){l=e;break}!1!==l?(d=!0,G(i).jqGrid("editCell",t,l,!0,o)):(d=!1,0<i.p.savedRow.length&&G(i).jqGrid("saveCell",t,r))}),d},GridNav:function(){return this.each(function(){var
e,i,l,s=this;function
t(e,i,l){var
t,r,o,d;"v"===l.substr(0,1)&&(t=G(s.grid.bDiv)[0].clientHeight,d=G(s.grid.bDiv)[0].scrollTop,r=s.rows[e].offsetTop+s.rows[e].clientHeight,o=s.rows[e].offsetTop,"vd"===l&&t<=r&&(G(s.grid.bDiv)[0].scrollTop=G(s.grid.bDiv)[0].scrollTop+s.rows[e].clientHeight),"vu"===l)&&o<d&&(G(s.grid.bDiv)[0].scrollTop=G(s.grid.bDiv)[0].scrollTop-s.rows[e].clientHeight),"h"===l&&(t=G(s.grid.bDiv)[0].clientWidth,r=G(s.grid.bDiv)[0].scrollLeft,o=s.rows[e].cells[i].offsetLeft+s.rows[e].cells[i].clientWidth,d=s.rows[e].cells[i].offsetLeft,o>=t+parseInt(r,10)?G(s.grid.bDiv)[0].scrollLeft=G(s.grid.bDiv)[0].scrollLeft+s.rows[e].cells[i].clientWidth:d<r&&(G(s.grid.bDiv)[0].scrollLeft=G(s.grid.bDiv)[0].scrollLeft-s.rows[e].cells[i].clientWidth))}function
r(e,i){var
l,t;if("lft"===i)for(l=e+1,t=e;0<=t;t--)if(!0!==s.p.colModel[t].hidden){l=t;break}if("rgt"===i)for(l=e-1,t=e;t<s.p.colModel.length;t++)if(!0!==s.p.colModel[t].hidden){l=t;break}return l}s.grid&&!0===s.p.cellEdit&&(s.p.knv=s.p.id+"_kn",e=G("<div style='position:fixed;top:0px;width:1px;height:1px;' tabindex='0'><div tabindex='-1' style='width:1px;height:1px;' id='"+s.p.knv+"'></div></div>"),G(e).insertBefore(s.grid.cDiv),G("#"+s.p.knv).focus().keydown(function(e){switch(l=e.keyCode,"rtl"===s.p.direction&&(37===l?l=39:39===l&&(l=37)),l){case
38:0<s.p.iRow-1&&(t(s.p.iRow-1,s.p.iCol,"vu"),G(s).jqGrid("editCell",s.p.iRow-1,s.p.iCol,!1,e));break;case
40:s.p.iRow+1<=s.rows.length-1&&(t(s.p.iRow+1,s.p.iCol,"vd"),G(s).jqGrid("editCell",s.p.iRow+1,s.p.iCol,!1,e));break;case
37:0<=s.p.iCol-1&&(i=r(s.p.iCol-1,"lft"),t(s.p.iRow,i,"h"),G(s).jqGrid("editCell",s.p.iRow,i,!1,e));break;case
39:s.p.iCol+1<=s.p.colModel.length-1&&(i=r(s.p.iCol+1,"rgt"),t(s.p.iRow,i,"h"),G(s).jqGrid("editCell",s.p.iRow,i,!1,e));break;case
13:0<=parseInt(s.p.iCol,10)&&0<=parseInt(s.p.iRow,10)&&G(s).jqGrid("editCell",s.p.iRow,s.p.iCol,!0,e);break;default:return!0}return!1}))})},getChangedCells:function(o){var
e=[];return o=o||"all",this.each(function(){var
t,r=this;r.grid&&!0===r.p.cellEdit&&G(r.rows).each(function(i){var
l={};G(this).hasClass("edited")&&(G("td",this).each(function(e){if("cb"!==(t=r.p.colModel[e].name)&&"subgrid"!==t&&"sc"!==t)if("dirty"===o){if(G(this).hasClass("dirty-cell"))try{l[t]=G.unformat.call(r,this,{rowId:r.rows[i].id,colModel:r.p.colModel[e]},e)}catch(e){l[t]=G.jgrid.htmlDecode(G(this).html())}}else
try{l[t]=G.unformat.call(r,this,{rowId:r.rows[i].id,colModel:r.p.colModel[e]},e)}catch(e){l[t]=G.jgrid.htmlDecode(G(this).html())}}),l.id=this.id,e.push(l))})}),e}})});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.base","./jqModal","./jqDnR"],e):e(jQuery)}(function(y){"use strict";y.extend(y.jgrid,{showModal:function(e){e.w.show()},closeModal:function(e){e.w.hide().attr("aria-hidden","true"),e.o&&e.o.remove()},hideModal:function(e,t){var
i,a,o=!(!(t=y.extend({jqm:!0,gb:"",removemodal:!1,formprop:!1,form:""},t||{})).gb||"string"!=typeof
t.gb||"#gbox_"!==t.gb.substr(0,6))&&y("#"+t.gb.substr(6))[0];if(t.onClose){var
r=o?t.onClose.call(o,e):t.onClose(e);if("boolean"==typeof
r&&!r)return}if(t.formprop&&o&&t.form&&("edit"===t.form?(i="#"+y.jgrid.jqID("FrmGrid_"+t.gb.substr(6)),a="formProp"):"view"===t.form&&(i="#"+y.jgrid.jqID("ViewGrid_"+t.gb.substr(6)),a="viewProp"),y(o).data(a,{top:y.jgrid.floatNum(y(e).css("top")),left:y.jgrid.floatNum(y(e).css("left")),width:y.jgrid.floatNum(y(e)[0].style.width),height:y.jgrid.floatNum(y(e)[0].style.height),dataheight:y(i).height(),datawidth:y(i).width()})),y.fn.jqm&&!0===t.jqm)y(e).attr("aria-hidden","true").jqmHide();else{if(""!==t.gb)try{y(t.gb).find(".jqgrid-overlay").first().hide()}catch(e){}try{y(".jqgrid-overlay-modal").hide()}catch(e){}y(e).hide().attr("aria-hidden","true")}t.removemodal&&y(e).remove()},findPos:function(e){e=y(e).offset();return[e.left,e.top]},createModal:function(i,e,a,t,o,r,n){a=y.extend(!0,{},y.jgrid.jqModal||{},a);var
d=this,l="rtl"===y(a.gbox).attr("dir"),s=y.jgrid.styleUI[a.styleUI||"jQueryUI"].modal,u=y.jgrid.styleUI[a.styleUI||"jQueryUI"].common,c=document.createElement("div"),m=(n=y.extend({},n||{}),c.className="ui-jqdialog "+s.modal,c.id=i.themodal,document.createElement("div")),f=(m.className="ui-jqdialog-titlebar "+s.header,m.id=i.modalhead,y(m).append("<span class='ui-jqdialog-title'>"+a.caption+"</span>"),y("<a class='ui-jqdialog-titlebar-close "+u.cornerall+"' aria-label='Close'></a>").hover(function(){f.addClass(u.hover)},function(){f.removeClass(u.hover)}).append("<span class='"+u.icon_base+" "+s.icon_close+"'></span>")),g=(y(m).append(f),l?(c.dir="rtl",y(".ui-jqdialog-title",m).css("float","right"),y(".ui-jqdialog-titlebar-close",m).css("left","0.3em")):(c.dir="ltr",y(".ui-jqdialog-title",m).css("float","left"),y(".ui-jqdialog-titlebar-close",m).css("right","0.3em")),document.createElement("div")),e=(y(g).addClass("ui-jqdialog-content "+s.content).attr("id",i.modalcontent),y(g).append(e),c.appendChild(g),y(c).prepend(m),!0===r?y("body").append(c):"string"==typeof
r?y(r).append(c):y(c).insertBefore(t),y(c).css(n),void
0===a.jqModal&&(a.jqModal=!0),{});y.fn.jqm&&!0===a.jqModal?(0===a.left&&0===a.top&&a.overlay&&(g=[],g=y.jgrid.findPos(o),a.left=g[0]+4,a.top=g[1]+4),e.top=a.top+"px",e.left=a.left):0===a.left&&0===a.top||(e.left=a.left,e.top=a.top+"px"),y("a.ui-jqdialog-titlebar-close",m).click(function(){var
e=y("#"+y.jgrid.jqID(i.themodal)).data("onClose")||a.onClose,t=y("#"+y.jgrid.jqID(i.themodal)).data("gbox")||a.gbox;return d.hideModal("#"+y.jgrid.jqID(i.themodal),{gb:t,jqm:a.jqModal,onClose:e,removemodal:a.removemodal||!1,formprop:!a.recreateForm||!1,form:a.form||""}),!1}),0!==a.width&&a.width||(a.width=300),0!==a.height&&a.height||(a.height=200),a.zIndex||(n=y(t).parents("*[role=dialog]").first().css("z-index"),a.zIndex=n?parseInt(n,10)+2:950);if(l&&e.hasOwnProperty("left")&&!r&&(o=y(a.gbox).outerWidth()-(isNaN(a.width)?0:parseInt(a.width,10))+12,e.left=parseInt(e.left,10)+parseInt(o,10)),e.hasOwnProperty("left")&&(e.left+="px"),y(c).css(y.extend({width:isNaN(a.width)?"auto":a.width+"px",height:isNaN(a.height)?"auto":a.height+"px",zIndex:a.zIndex,overflow:"hidden"},e)).attr({tabIndex:"-1",role:"dialog","aria-labelledby":i.modalhead,"aria-hidden":"true"}),void
0===a.drag&&(a.drag=!0),void
0===a.resize&&(a.resize=!0),a.drag)if(y(m).css("cursor","move"),y.fn.tinyDraggable)y(c).tinyDraggable({handle:"#"+y.jgrid.jqID(m.id)});else
try{y(c).draggable({handle:y("#"+y.jgrid.jqID(m.id))})}catch(e){}if(a.resize)if(y.fn.jqResize)y(c).append("<div class='jqResize "+s.resizable+" "+u.icon_base+" "+s.icon_resizable+"'></div>"),y("#"+y.jgrid.jqID(i.themodal)).jqResize(".jqResize",!!i.scrollelm&&"#"+y.jgrid.jqID(i.scrollelm));else
try{y(c).resizable({handles:"se, sw",alsoResize:!!i.scrollelm&&"#"+y.jgrid.jqID(i.scrollelm)})}catch(e){}!0===a.closeOnEscape&&y(c).keydown(function(e){27===e.which&&(e=y("#"+y.jgrid.jqID(i.themodal)).data("onClose")||a.onClose,d.hideModal("#"+y.jgrid.jqID(i.themodal),{gb:a.gbox,jqm:a.jqModal,onClose:e,removemodal:a.removemodal||!1,formprop:!a.recreateForm||!1,form:a.form||""}))})},viewModal:function(e,t){var
i="";if((t=y.extend({toTop:!0,overlay:10,modal:!1,overlayClass:"ui-widget-overlay",onShow:y.jgrid.showModal,onHide:y.jgrid.closeModal,gbox:"",jqm:!0,jqM:!0},t||{})).gbox){var
a=y("#"+t.gbox.substring(6))[0];try{i=y(a).jqGrid("getStyleUI",a.p.styleUI+".common","overlay",!1,"jqgrid-overlay-modal"),t.overlayClass=y(a).jqGrid("getStyleUI",a.p.styleUI+".common","overlay",!0)}catch(e){}}if(void
0===t.focusField&&(t.focusField=0),"number"==typeof
t.focusField&&0<=t.focusField?t.focusField=parseInt(t.focusField,10):"boolean"!=typeof
t.focusField||t.focusField?t.focusField=0:t.focusField=!1,y.fn.jqm&&!0===t.jqm)(t.jqM?y(e).attr("aria-hidden","false").jqm(t):y(e).attr("aria-hidden","false")).jqmShow();else
if(""!==t.gbox&&(a=parseInt(y(e).css("z-index"))-1,t.modal?(y(".jqgrid-overlay-modal")[0]||y("body").prepend("<div "+i+"></div>"),y(".jqgrid-overlay-modal").css("z-index",a).show()):(y(t.gbox).find(".jqgrid-overlay").first().css("z-index",a).show(),y(e).data("gbox",t.gbox))),y(e).show().attr("aria-hidden","false"),0<=t.focusField)try{y(":input:visible",e)[t.focusField].focus()}catch(e){}},info_dialog:function(e,t,i,a){var
o,r={width:290,height:"auto",dataheight:"auto",drag:!0,resize:!1,left:window.innerWidth/2-145,top:window.innerHeight/2-150,zIndex:1e3,jqModal:!0,modal:!1,closeOnEscape:!0,align:"center",buttonalign:"center",buttons:[]},n=(y.extend(!0,r,y.jgrid.jqModal||{},{caption:"<b>"+e+"</b>"},a||{}),r.jqModal),d=this,e=y.jgrid.styleUI[r.styleUI||"jQueryUI"].modal,l=y.jgrid.styleUI[r.styleUI||"jQueryUI"].common,s=(y.fn.jqm&&!n&&(n=!1),"");if(0<r.buttons.length)for(o=0;o<r.buttons.length;o++)void
0===r.buttons[o].id&&(r.buttons[o].id="info_button_"+o),s+="<a id='"+r.buttons[o].id+"' class='fm-button "+l.button+"'>"+r.buttons[o].text+"</a>";a="<div id='info_id'>",a=(a+="<div id='infocnt' style='margin:0px;padding-bottom:1em;width:100%;overflow:auto;position:relative;height:"+(isNaN(r.dataheight)?r.dataheight:r.dataheight+"px")+";"+("text-align:"+r.align+";")+"'>"+t+"</div>")+(i?"<div class='"+e.content+"' style='text-align:"+r.buttonalign+";padding-bottom:0.8em;padding-top:0.5em;background-image: none;border-width: 1px 0 0 0;'><a id='closedialog' class='fm-button "+l.button+"'>"+i+"</a>"+s+"</div>":""!==s?"<div class='"+e.content+"' style='text-align:"+r.buttonalign+";padding-bottom:0.8em;padding-top:0.5em;background-image: none;border-width: 1px 0 0 0;'>"+s+"</div>":"")+"</div>";try{"false"===y("#info_dialog").attr("aria-hidden")&&y.jgrid.hideModal("#info_dialog",{jqm:n}),y("#info_dialog").remove()}catch(e){}t=y(".ui-jqgrid").css("font-size")||"11px";y.jgrid.createModal({themodal:"info_dialog",modalhead:"info_head",modalcontent:"info_content",scrollelm:"infocnt"},a,r,"","",!0,{"font-size":t}),s&&y.each(r.buttons,function(e){y("#"+y.jgrid.jqID(this.id),"#info_id").on("click",function(){return r.buttons[e].onClick.call(y("#info_dialog")),!1})}),y("#closedialog","#info_id").on("click",function(){return d.hideModal("#info_dialog",{jqm:n,onClose:y("#info_dialog").data("onClose")||r.onClose,gb:y("#info_dialog").data("gbox")||r.gbox}),!1}),y(".fm-button","#info_dialog").hover(function(){y(this).addClass(l.hover)},function(){y(this).removeClass(l.hover)}),y.jgrid.isFunction(r.beforeOpen)&&r.beforeOpen(),y.jgrid.viewModal("#info_dialog",{onHide:function(e){e.w.hide().remove(),e.o&&e.o.remove()},modal:r.modal,jqm:n}),y.jgrid.isFunction(r.afterOpen)&&r.afterOpen();try{y("#info_dialog").focus()}catch(e){}},bindEv:function(e,i){y.jgrid.isFunction(i.dataInit)&&i.dataInit.call(this,e,i),i.dataEvents&&y.each(i.dataEvents,function(){var
t=this.fn;void
0!==this.data?y(e).on(this.type,this.data,function(e){t.call(this,e,i)}):y(e).on(this.type,function(e){t.call(this,e,i)})})},createEl:function(e,t,i,a,o){var
r="",c=this;function
m(i,e,t){var
a=(a=["dataInit","dataEvents","dataUrl","buildSelect","sopt","searchhidden","defaultValue","attr","custom_element","custom_value","oper"]).concat(["cacheUrlData","delimiter","separator"]);void
0!==t&&Array.isArray(t)&&y.merge(a,t),y.each(e,function(e,t){-1===y.inArray(e,a)&&y(i).attr(e,t)}),e.hasOwnProperty("id")||y(i).attr("id",y.jgrid.randId())}switch(e){case"textarea":r=document.createElement("textarea"),a?t.cols||y(r).css({width:"98%"}):t.cols||(t.cols=20),t.rows||(t.rows=2),("&nbsp;"===i||"&#160;"===i||1===i.length&&160===i.charCodeAt(0))&&(i=""),r.value=i,y(r).attr({role:"textbox",multiline:"true"}),m(r,t);break;case"checkbox":(r=document.createElement("input")).type="checkbox",t.value?(i===(s=t.value.split(":"))[0]&&(r.checked=!0,r.defaultChecked=!0),r.value=s[0],y(r).attr("offval",s[1])):((s=(i+"").toLowerCase()).search(/(false|f|0|no|n|off|undefined)/i)<0&&""!==s?(r.checked=!0,r.defaultChecked=!0,r.value=i):r.value="on",y(r).attr("offval","off")),y(r).attr("role","checkbox"),m(r,t,["value"]);break;case"select":(r=document.createElement("select")).setAttribute("role","select");var
n,d,l=[];if(!0===t.multiple?(n=!0,r.multiple="multiple",y(r).attr("aria-multiselectable","true")):n=!1,null!=t.dataUrl){var
s=null,f=t.postData||o.postData;try{s=t.rowId}catch(e){}c.p&&c.p.idPrefix&&(s=y.jgrid.stripPref(c.p.idPrefix,s)),y.ajax(y.extend({url:y.jgrid.isFunction(t.dataUrl)?t.dataUrl.call(c,s,i,String(t.name)):t.dataUrl,type:"GET",dataType:"html",data:y.jgrid.isFunction(f)?f.call(c,s,i,String(t.name)):f,context:{elem:r,options:t,vl:i},success:function(e){var
t,i,a=[],o=this.elem,r=this.vl,n=y.extend({},this.options),d=!0===n.multiple,l=!0===n.cacheUrlData,s="",u=[],e=y.jgrid.isFunction(n.buildSelect)?n.buildSelect.call(c,e):e;(e="string"==typeof
e?y(y.jgrid.trim(e)).html():e)&&(y(o).append(e),m(o,n,f?["postData"]:void
0),void
0===n.size&&(n.size=d?3:1),d?(e=void
0===n.multiseparator?",":n.multiseparator,a=r.split(e),a=y.map(a,function(e){return y.jgrid.trim(e)})):a[0]=y.jgrid.trim(r),y("option",o).each(function(e){t=y(this).text(),r=y(this).val(),l&&(s+=(0!==e?";":"")+r+":"+t),0===e&&o.multiple&&(this.selected=!1),y(this).attr("role","option"),(-1<y.inArray(y.jgrid.trim(t),a)||-1<y.inArray(y.jgrid.trim(r),a))&&(this.selected="selected",u.push(r))}),n.hasOwnProperty("checkUpdate")&&n.checkUpdate&&(c.p.savedData[n.name]=u.join(",")),l&&("edit"===n.oper?y(c).jqGrid("setColProp",n.name,{editoptions:{buildSelect:null,dataUrl:null,value:s}}):"search"===n.oper?y(c).jqGrid("setColProp",n.name,{searchoptions:{dataUrl:null,value:s}}):"filter"===n.oper&&y("#fbox_"+c.p.id)[0].p&&(d=y("#fbox_"+c.p.id)[0].p.columns,y.each(d,function(e){if(i=this.index||this.name,n.name===i)return this.searchoptions.dataUrl=null,this.searchoptions.value=s,!1}))),y(c).triggerHandler("jqGridAddEditAfterSelectUrlComplete",[o]))}},o||{}))}else
if(t.value){void
0===t.size&&(t.size=n?3:1),n&&(l=i.split(","),l=y.map(l,function(e){return y.jgrid.trim(e)})),"function"==typeof
t.value&&(t.value=t.value());var
u,g,p,h,j,v,b=void
0===t.separator?":":t.separator,s=void
0===t.delimiter?";":t.delimiter;if("string"==typeof
t.value)for(u=t.value.split(s),d=0;d<u.length;d++)2<(g=u[d].split(b)).length&&(g[1]=y.map(g,function(e,t){if(0<t)return e}).join(b)),(p=document.createElement("option")).setAttribute("role","option"),p.value=g[0],p.innerHTML=g[1],r.appendChild(p),n||y.jgrid.trim(g[0])!==y.jgrid.trim(i)&&y.jgrid.trim(g[1])!==y.jgrid.trim(i)||(p.selected="selected"),n&&(-1<y.inArray(y.jgrid.trim(g[1]),l)||-1<y.inArray(y.jgrid.trim(g[0]),l))&&(p.selected="selected");else
if("[object Array]"===Object.prototype.toString.call(t.value))for(h=t.value,d=0;d<h.length;d++)2===h[d].length&&(j=h[d][0],v=h[d][1],(p=document.createElement("option")).setAttribute("role","option"),p.value=j,p.innerHTML=v,r.appendChild(p),n||y.jgrid.trim(j)!==y.jgrid.trim(i)&&y.jgrid.trim(v)!==y.jgrid.trim(i)||(p.selected="selected"),n)&&(-1<y.inArray(y.jgrid.trim(v),l)||-1<y.inArray(y.jgrid.trim(j),l))&&(p.selected="selected");else
if("object"==typeof
t.value)for(j
in
h=t.value)h.hasOwnProperty(j)&&((p=document.createElement("option")).setAttribute("role","option"),p.value=j,p.innerHTML=h[j],r.appendChild(p),n||y.jgrid.trim(j)!==y.jgrid.trim(i)&&y.jgrid.trim(h[j])!==y.jgrid.trim(i)||(p.selected="selected"),n)&&(-1<y.inArray(y.jgrid.trim(h[j]),l)||-1<y.inArray(y.jgrid.trim(j),l))&&(p.selected="selected");m(r,t,["value"])}else
m(r,t);break;case"image":case"file":(r=document.createElement("input")).type=e,m(r,t);break;case"custom":r=document.createElement("span");try{if(!y.jgrid.isFunction(t.custom_element))throw"e1";var
F=t.custom_element.call(c,i,t);if(!F)throw"e2";F=y(F).addClass("customelement").attr({id:t.id,name:t.name}),y(r).empty().append(F)}catch(e){s=y.jgrid.getRegional(c,"errors"),F=y.jgrid.getRegional(c,"edit");"e1"===e?y.jgrid.info_dialog(s.errcap,"function 'custom_element' "+F.msg.nodefined,F.bClose,{styleUI:c.p.styleUI}):"e2"===e?y.jgrid.info_dialog(s.errcap,"function 'custom_element' "+F.msg.novalue,F.bClose,{styleUI:c.p.styleUI}):y.jgrid.info_dialog(s.errcap,"string"==typeof
e?e:e.message,F.bClose,{styleUI:c.p.styleUI})}break;default:s="button"===e?"button":"textbox";(r=document.createElement("input")).type=e,r.value=i,"button"!==e&&(a?t.size||y(r).css({width:"96%"}):t.size||(t.size=20)),y(r).attr("role",s),m(r,t)}return r},checkDate:function(e,t){var
i={},a=-1!==(e=e.toLowerCase()).indexOf("/")?"/":-1!==e.indexOf("-")?"-":-1!==e.indexOf(".")?".":"/";if(e=e.split(a),3!==(t=t.split(a)).length)return!1;for(var
o=-1,r=-1,n=-1,d=0;d<e.length;d++){var
l=isNaN(t[d])?0:parseInt(t[d],10);i[e[d]]=l,-1!==(s=e[d]).indexOf("y")&&(o=d),-1!==s.indexOf("m")&&(n=d),-1!==s.indexOf("d")&&(r=d)}var
s="y"===e[o]||"yyyy"===e[o]?4:"yy"===e[o]?2:-1;return-1!==o&&(a=i[e[o]].toString(),2===s&&1===a.length&&(s=1),a.length===s)&&(0!==i[e[o]]||"00"===t[o])&&-1!==n&&!(i[e[n]].toString().length<1||i[e[n]]<1||12<i[e[n]]||-1===r||i[e[r]].toString().length<1||i[e[r]]<1||31<i[e[r]]||2===i[e[n]]&&i[e[r]]>((a=i[e[o]])%4!=0||a%100==0&&a%400!=0?28:29)||i[e[r]]>[0,31,29,31,30,31,30,31,31,30,31,30,31][i[e[n]]])},isEmpty:function(e){return!(void
0!==e&&!e.match(/^\s+$/)&&""!==e)},checkTime:function(e){if(!y.jgrid.isEmpty(e)){if(!(e=e.match(/^(\d{1,2}):(\d{2})([apAP][Mm])?$/)))return!1;if(e[3]){if(e[1]<1||12<e[1])return!1}else
if(23<e[1])return!1;if(59<e[2])return!1}return!0},checkValues:function(e,t,i,a){function
o(e){var
t,i;return!(2<=(e=e.toString()).length&&("-"===e[0]?(t=e[1],e[2]&&(i=e[2])):(t=e[0],e[1]&&(i=e[1])),"0"===t)&&"."!==i)&&"number"==typeof
Number(e)&&isFinite(e)}var
r,n,d,l,s,u=this,c=u.p.colModel,m=y.jgrid.getRegional(this,"edit.msg");if(void
0===i)if("string"==typeof
t){for(n=0,s=c.length;n<s;n++)if(c[n].name===t){r=c[n].editrules,null!=c[t=n].formoptions&&(d=c[n].formoptions.label);break}}else
0<=t&&(r=c[t].editrules);else
r=i,d=void
0===a?"_":a;if(r){if(d=d||(null!=u.p.colNames?u.p.colNames[t]:c[t].label),!0===r.required&&y.jgrid.isEmpty(e))return[!1,d+": "+m.required,""];i=!1!==r.required;if(!0===r.number&&!(!1==i&&y.jgrid.isEmpty(e)||o(e)))return[!1,d+": "+m.number,""];if(void
0!==r.minValue&&!isNaN(r.minValue)&&y.jgrid.floatNum(e)<y.jgrid.floatNum(r.minValue))return[!1,d+": "+m.minValue+" "+r.minValue,""];if(void
0!==r.maxValue&&!isNaN(r.maxValue)&&y.jgrid.floatNum(e)>y.jgrid.floatNum(r.maxValue))return[!1,d+": "+m.maxValue+" "+r.maxValue,""];if(!0===r.email&&!(!1==i&&y.jgrid.isEmpty(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(e)))return[!1,d+": "+m.email,""];if(!0===r.integer&&(!1!=i||!y.jgrid.isEmpty(e))){if(!o(e))return[!1,d+": "+m.integer,""];if(e%1!=0||-1!==e.indexOf("."))return[!1,d+": "+m.integer,""]}if(!0===r.date&&!(!1==i&&y.jgrid.isEmpty(e)||(c[t].formatoptions&&c[t].formatoptions.newformat?(l=c[t].formatoptions.newformat,(a=y.jgrid.getRegional(u,"formatter.date.masks"))&&a.hasOwnProperty(l)&&(l=a[l])):l=c[t].datefmt||"Y-m-d",y.jgrid.checkDate(l,e))))return[!1,d+": "+m.date+" - "+l,""];if(!0===r.time&&!(!1==i&&y.jgrid.isEmpty(e)||y.jgrid.checkTime(e)))return[!1,d+": "+m.date+" - hh:mm (am/pm)",""];if(!0===r.url&&!(!1==i&&y.jgrid.isEmpty(e)||/^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i.test(e)))return[!1,d+": "+m.url,""];if(!0===r.custom)if(!1!=i||!y.jgrid.isEmpty(e))return y.jgrid.isFunction(r.custom_func)?(a=r.custom_func.call(u,e,d,t),Array.isArray(a)?a:[!1,m.customarray,""]):[!1,m.customfcheck,""]}return[!0,"",""]},validateForm:function(e){for(var
t,i=!0,a=0;a<e.elements.length;a++)if(("INPUT"===(t=e.elements[a]).nodeName||"TEXTAREA"===t.nodeName||"SELECT"===t.nodeName)&&(void
0!==t.willValidate?("INPUT"===t.nodeName&&t.type!==t.getAttribute("type")&&t.setCustomValidity(y.jgrid.LegacyValidation(t)?"":"error"),t.reportValidity()):(t.validity=t.validity||{},t.validity.valid=y.jgrid.LegacyValidation(t)),!t.validity.valid)){i=!1;break}return i},LegacyValidation:function(e){var
t=!0,i=e.value,a=e.getAttribute("type"),a="checkbox"===a||"radio"===a,o=e.getAttribute("required"),r=e.getAttribute("minlength"),n=e.getAttribute("maxlength"),d=e.getAttribute("pattern");return e.disabled||(t=(t=t&&(!o||a&&e.checked||!a&&""!==i))&&(a||(!r||i.length>=r)&&(!n||i.length<=n)))&&d&&(t=(d=new
RegExp(d)).test(i)),t},buildButtons:function(e,i,a){var
o;return y.each(e,function(e,t){t.id||(t.id=y.jgrid.randId()),t.position||(t.position="last"),t.side||(t.side="left"),o=t.icon?" fm-button-icon-"+t.side+"'><span class='"+a.icon_base+" "+t.icon+"'></span>":"'>",o="<a  data-index='"+e+"' id='"+t.id+"' class='fm-button "+a.button+o+t.text+"</a>","last"===t.position?i+=o:i=o+i}),i},setSelNavIndex:function(i,a){var
e=y(".ui-pg-button",i.p.pager);y.each(e,function(e,t){if(a===t)return i.p.navIndex=e,!1}),y(a).attr("tabindex","0")},getFirstVisibleCol:function(e){for(var
t=-1,i=0;i<e.p.colModel.length;i++)if(!0!==e.p.colModel[i].hidden){t=i;break}return t},getLastVisibleCol:function(e){for(var
t=-1,i=e.p.colModel.length-1;0<=i;i--)if(!0!==e.p.colModel[i].hidden){t=i;break}return t}})});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.base","./grid.common"],e):e(jQuery)}(function(T){"use strict";T.fn.jqFilter=function(e){if("string"==typeof
e){var
t,r=T.fn.jqFilter[e];if(r)return t=T.makeArray(arguments).slice(1),r.apply(this,t);throw"jqFilter - No such method: "+e}var
x=T.extend(!0,{filter:null,columns:[],sortStrategy:null,onChange:null,afterRedraw:null,checkValues:null,error:!1,errmsg:"",errorcheck:!0,showQuery:!0,sopt:null,ops:[],operands:null,numopts:["eq","ne","lt","le","gt","ge","nu","nn","in","ni"],stropts:["eq","ne","bw","bn","ew","en","cn","nc","nu","nn","in","ni"],strarr:["text","string","blob"],groupOps:[{op:"AND",text:"AND"},{op:"OR",text:"OR"}],groupButton:!0,ruleButtons:!0,uniqueSearchFields:!1,direction:"ltr",addsubgrup:"Add subgroup",addrule:"Add rule",delgroup:"Delete group",delrule:"Delete rule",autoencode:!1,unaryOperations:[]},T.jgrid.filter,e||{});return this.each(function(){if(!this.filter){this.p=x,null!==this.p.filter&&void
0!==this.p.filter||(this.p.filter={groupOp:this.p.groupOps[0].op,rules:[],groups:[]}),null!=this.p.sortStrategy&&T.jgrid.isFunction(this.p.sortStrategy)&&this.p.columns.sort(this.p.sortStrategy);var
e,t,r=this.p.columns.length,b=/msie/i.test(navigator.userAgent)&&!window.opera;if(this.p.initFilter=T.extend(!0,{},this.p.filter),r){for(e=0;e<r;e++)(t=this.p.columns[e]).stype?t.inputtype=t.stype:t.inputtype||(t.inputtype="text"),t.sorttype?t.searchtype=t.sorttype:t.searchtype||(t.searchtype="string"),void
0===t.hidden&&(t.hidden=!1),t.label||(t.label=t.name),t.index&&(t.name=t.index),t.hasOwnProperty("searchoptions")||(t.searchoptions={}),t.hasOwnProperty("searchrules")||(t.searchrules={}),void
0===t.search?t.inlist=!0:t.inlist=t.search;var
S=function(){return T("#"+T.jgrid.jqID(x.id))[0]||null},s=S(),F=T.jgrid.styleUI[s.p.styleUI||"jQueryUI"].filter,O=T.jgrid.styleUI[s.p.styleUI||"jQueryUI"].common,o=(this.p.showQuery&&T(this).append("<table class='queryresult "+F.table_widget+"' style='display:block;max-width:440px;border:0px none;' dir='"+this.p.direction+"'><tbody><tr><td class='query'></td></tr></tbody></table>"),function(e,t){var
r=[!0,""],s=S();if(T.jgrid.isFunction(t.searchrules))r=t.searchrules.call(s,e,t);else
if(T.jgrid&&T.jgrid.checkValues)try{r=T.jgrid.checkValues.call(s,e,-1,t.searchrules,t.label)}catch(e){}r&&r.length&&!1===r[0]&&(x.error=!r[0],x.errmsg=r[1])});this.onchange=function(){return this.p.error=!1,this.p.errmsg="",!!T.jgrid.isFunction(this.p.onChange)&&this.p.onChange.call(this,this.p)},this.reDraw=function(){T(this).find("table.group").first().remove();var
e=this.createTableForGroup(x.filter,null);T(this).append(e),T.jgrid.isFunction(this.p.afterRedraw)&&this.p.afterRedraw.call(this,this.p)},this.createTableForGroup=function(s,e){var
a=this,t=T("<table class='group "+F.table_widget+" ui-search-table' style='border:0px none;'><tbody></tbody></table>"),r="left",i=("rtl"===this.p.direction&&(r="right",t.attr("dir","rtl")),null===e&&t.append("<tr class='error' style='display:none;'><th colspan='5' class='"+O.error+"' align='"+r+"'></th></tr>"),T("<tr></tr>")),r=(t.append(i),T("<th colspan='5' align='"+r+"'></th>"));if(i.append(r),!0===this.p.ruleButtons){for(var
o,l=T("<select size='1' class='opsel "+F.srSelect+"'></select>"),n=(r.append(l),""),p=0;p<x.groupOps.length;p++)o=s.groupOp===a.p.groupOps[p].op?" selected='selected'":"",n+="<option value='"+a.p.groupOps[p].op+"'"+o+">"+a.p.groupOps[p].text+"</option>";l.append(n).on("change",function(){s.groupOp=T(l).val(),a.onchange()})}var
c,i="<span></span>";if(this.p.groupButton&&(i=T("<input type='button' value='+ {}' title='"+a.p.addsubgrup+"' class='add-group "+O.button+"'/>")).on("click",function(){return void
0===s.groups&&(s.groups=[]),s.groups.push({groupOp:x.groupOps[0].op,rules:[],groups:[]}),a.reDraw(),a.onchange(),!1}),r.append(i),!0===this.p.ruleButtons&&((i=T("<input type='button' value='+' title='"+a.p.addrule+"' class='add-rule ui-add "+O.button+"'/>")).on("click",function(){for(void
0===s.rules&&(s.rules=[]),p=0;p<a.p.columns.length;p++){var
e=void
0===a.p.columns[p].search||a.p.columns[p].search,t=!0===a.p.columns[p].hidden;if(!0===a.p.columns[p].searchoptions.searchhidden&&e||e&&!t){c=a.p.columns[p];break}}var
r;return c&&(r=c.searchoptions.sopt||a.p.sopt||(-1!==T.inArray(c.searchtype,a.p.strarr)?a.p.stropts:a.p.numopts),s.rules.push({field:c.name,op:r[0],data:""}),a.reDraw()),!1}),r.append(i)),null!==e&&(i=T("<input type='button' value='-' title='"+a.p.delgroup+"' class='delete-group "+O.button+"'/>"),r.append(i),i.on("click",function(){for(p=0;p<e.groups.length;p++)if(e.groups[p]===s){e.groups.splice(p,1);break}return a.reDraw(),a.onchange(),!1})),void
0!==s.groups)for(p=0;p<s.groups.length;p++){var
d=T("<tr></tr>"),u=(t.append(d),T("<td class='first'></td>")),u=(d.append(u),T("<td colspan='4'></td>"));u.append(this.createTableForGroup(s.groups[p],s)),d.append(u)}void
0===s.groupOp&&(s.groupOp=a.p.groupOps[0].op);var
h=a.p.ruleButtons&&a.p.uniqueSearchFields;if(h)for(f=0;f<a.p.columns.length;f++)a.p.columns[f].inlist&&(a.p.columns[f].search=!0);if(void
0!==s.rules)for(p=0;p<s.rules.length;p++)if(t.append(this.createTableRowForRule(s.rules[p],s)),h)for(var
g=s.rules[p].field,f=0;f<a.p.columns.length;f++)if(g===a.p.columns[f].name){a.p.columns[f].search=!1;break}return t},this.createTableRowForRule=function(i,e){for(var
o,l,n,t,p,c=this,d=S(),r=T("<tr></tr>"),s="",a=(r.append("<td class='first'></td>"),T("<td class='columns'></td>")),u=(r.append(a),T("<select size='1' class='"+F.srSelect+"'></select>")),h=[],g=(a.append(u),u.on("change",function(){var
e;for(c.p.ruleButtons&&c.p.uniqueSearchFields&&(t=parseInt(T(this).data("curr"),10),e=this.selectedIndex,0<=t)&&(c.p.columns[t].search=!0,T(this).data("curr",e),c.p.columns[e].search=!1),i.field=T(u).val(),l=T(this).parents("tr").first(),T(".data",l).empty(),f=0;f<c.p.columns.length;f++)if(c.p.columns[f].name===i.field){n=c.p.columns[f];break}if(n){n.searchoptions.id=T.jgrid.randId(),n.searchoptions.name=i.field,n.searchoptions.oper="filter",!b||"text"!==n.inputtype||n.searchoptions.size||(n.searchoptions.size=10);var
t,r=T.jgrid.createEl.call(d,n.inputtype,n.searchoptions,"",!0,c.p.ajaxSelectOptions||{},!0),s=(T(r).addClass("input-elm "+("select"===n.inputtype?F.srSelect:F.srInput)),o=n.searchoptions.sopt||c.p.sopt||(-1!==T.inArray(n.searchtype,c.p.strarr)?c.p.stropts:c.p.numopts),""),a=0;for(h=[],T.each(c.p.ops,function(){h.push(this.oper)}),f=0;f<o.length;f++)-1!==(p=T.inArray(o[f],h))&&(0===a&&(i.op=c.p.ops[p].oper),s+="<option value='"+c.p.ops[p].oper+"'>"+c.p.ops[p].text+"</option>",a++);T(".selectopts",l).empty().append(s),T(".selectopts",l)[0].selectedIndex=0,T.jgrid.msie()&&T.jgrid.msiever()<9&&(t=parseInt(T("select.selectopts",l)[0].offsetWidth,10)+1,T(".selectopts",l).width(t),T(".selectopts",l).css("width","auto")),T(".data",l).append(r),T.jgrid.bindEv.call(d,r,n.searchoptions),T(".input-elm",l).on("change",function(e){e=e.target;"custom"===n.inputtype&&T.jgrid.isFunction(n.searchoptions.custom_value)?i.data=n.searchoptions.custom_value.call(d,T(".customelement",this),"get"):i.data=T(e).val(),"select"===n.inputtype&&n.searchoptions.multiple&&(i.data=i.data.join(",")),c.onchange()}),setTimeout(function(){i.data=T(r).val(),("nu"===i.op||"nn"===i.op||0<=T.inArray(i.op,c.p.unaryOperations))&&(T(r).attr("readonly","true"),T(r).attr("disabled","true")),"select"===n.inputtype&&n.searchoptions.multiple&&Array.isArray(i.data)&&(i.data=i.data.join(",")),c.onchange()},0)}}),0),f=0;f<c.p.columns.length;f++){var
m=void
0===c.p.columns[f].search||c.p.columns[f].search,y=!0===c.p.columns[f].hidden;(!0===c.p.columns[f].searchoptions.searchhidden&&m||m&&!y)&&(t="",i.field===c.p.columns[f].name&&(t=" selected='selected'",g=f),s+="<option value='"+c.p.columns[f].name+"'"+t+">"+c.p.columns[f].label+"</option>")}u.append(s),u.data("curr",g);var
a=T("<td class='operators'></td>"),v=(r.append(a),(n=x.columns[g]).searchoptions.id=T.jgrid.randId(),!b||"text"!==n.inputtype||n.searchoptions.size||(n.searchoptions.size=10),n.searchoptions.name=i.field,n.searchoptions.oper="filter",T.jgrid.createEl.call(d,n.inputtype,n.searchoptions,i.data,!0,c.p.ajaxSelectOptions||{},!0)),j=(("nu"===i.op||"nn"===i.op||0<=T.inArray(i.op,c.p.unaryOperations))&&(T(v).attr("readonly","true"),T(v).attr("disabled","true")),T("<select size='1' class='selectopts "+F.srSelect+"'></select>"));for(a.append(j),j.on("change",function(){i.op=T(j).val(),l=T(this).parents("tr").first();var
e=T(".input-elm",l)[0];"nu"===i.op||"nn"===i.op||0<=T.inArray(i.op,c.p.unaryOperations)?(i.data="","SELECT"!==e.tagName.toUpperCase()&&(e.value=""),e.setAttribute("readonly","true"),e.setAttribute("disabled","true")):("SELECT"===e.tagName.toUpperCase()&&(i.data=e.value),e.removeAttribute("readonly"),e.removeAttribute("disabled")),c.onchange()}),o=n.searchoptions.sopt||c.p.sopt||(-1!==T.inArray(n.searchtype,c.p.strarr)?c.p.stropts:c.p.numopts),s="",T.each(c.p.ops,function(){h.push(this.oper)}),f=0;f<o.length;f++)-1!==(p=T.inArray(o[f],h))&&(t=i.op===c.p.ops[p].oper?" selected='selected'":"",s+="<option value='"+c.p.ops[p].oper+"'"+t+">"+c.p.ops[p].text+"</option>");j.append(s);a=T("<td class='data'></td>"),r.append(a),a.append(v),T.jgrid.bindEv.call(d,v,n.searchoptions),T(v).addClass("input-elm "+("select"===n.inputtype?F.srSelect:F.srInput)).on("change",function(){i.data="custom"===n.inputtype?n.searchoptions.custom_value.call(d,T(".customelement",this),"get"):T(this).val(),c.onchange()}),a=T("<td></td>");return r.append(a),!0===this.p.ruleButtons&&(v=T("<input type='button' value='-' title='"+c.p.delrule+"' class='delete-rule ui-del "+O.button+"'/>"),a.append(v),v.on("click",function(){for(f=0;f<e.rules.length;f++)if(e.rules[f]===i){e.rules.splice(f,1);break}return c.reDraw(),c.onchange(),!1})),r},this.getStringForGroup=function(e){var
t,r="(";if(void
0!==e.groups)for(t=0;t<e.groups.length;t++){1<r.length&&(r+=" "+e.groupOp+" ");try{r+=this.getStringForGroup(e.groups[t])}catch(e){alert(e)}}if(void
0!==e.rules)try{for(t=0;t<e.rules.length;t++)1<r.length&&(r+=" "+e.groupOp+" "),r+=this.getStringForRule(e.rules[t])}catch(e){alert(e)}return"()"===(r+=")")?"":r},this.getStringForRule=function(e){for(var
t,r,s="",a="",i=0;i<this.p.ops.length;i++)if(this.p.ops[i].oper===e.op){s=this.p.operands.hasOwnProperty(e.op)?this.p.operands[e.op]:"",a=this.p.ops[i].oper;break}for(i=0;i<this.p.columns.length;i++)if(this.p.columns[i].name===e.field){t=this.p.columns[i];break}return void
0===t?"":(r=this.p.autoencode?T.jgrid.htmlEncode(e.data):e.data,"bw"!==a&&"bn"!==a||(r+="%"),"ew"!==a&&"en"!==a||(r="%"+r),"cn"!==a&&"nc"!==a||(r="%"+r+"%"),"in"!==a&&"ni"!==a||(r=" ("+r+")"),x.errorcheck&&o(e.data,t),-1!==T.inArray(t.searchtype,["int","integer","float","number","currency"])||"nn"===a||"nu"===a||0<=T.inArray(e.op,this.p.unaryOperations)?e.field+" "+s+" "+r:e.field+" "+s+' "'+r+'"')},this.resetFilter=function(){this.p.filter=T.extend(!0,{},this.p.initFilter),this.reDraw(),this.onchange()},this.hideError=function(){T("th."+O.error,this).html(""),T("tr.error",this).hide()},this.showError=function(){T("th."+O.error,this).html(T.jgrid.stripScript(this.p.errmsg)),T("tr.error",this).show()},this.toUserFriendlyString=function(){return this.getStringForGroup(x.filter)},this.toString=function(){var
a=this;return function
e(t){var
r,s="(";if(void
0!==t.groups)for(r=0;r<t.groups.length;r++)1<s.length&&("OR"===t.groupOp?s+=" || ":s+=" && "),s+=e(t.groups[r]);if(void
0!==t.rules)for(r=0;r<t.rules.length;r++)1<s.length&&("OR"===t.groupOp?s+=" || ":s+=" && "),s+=function(e){if(a.p.errorcheck){for(var
t,r=0;r<a.p.columns.length;r++)if(a.p.columns[r].name===e.field){t=a.p.columns[r];break}t&&o(e.data,t)}return e.op+"(item."+e.field+",'"+e.data+"')"}(t.rules[r]);return"()"==(s+=")")?"":s}(this.p.filter)},this.reDraw(),this.p.showQuery&&this.onchange(),this.filter=!0}}})},T.extend(T.fn.jqFilter,{toSQLString:function(){var
e="";return this.each(function(){e=this.toUserFriendlyString()}),e},filterData:function(){var
e;return this.each(function(){e=this.p.filter}),e},getParameter:function(r){var
s=null;return void
0!==r&&this.each(function(e,t){t.p.hasOwnProperty(r)&&(s=t.p[r])}),s||this[0].p},resetFilter:function(){return this.each(function(){this.resetFilter()})},addFilter:function(e){"string"==typeof
e&&(e=T.jgrid.parse(e)),this.each(function(){this.p.filter=e,this.reDraw(),this.onchange()})}}),T.extend(T.jgrid,{filterRefactor:function(e){var
t,r,s,a,i,o,l={};try{if((l="string"==typeof
e.ruleGroup?T.jgrid.parse(e.ruleGroup):e.ruleGroup).rules&&l.rules.length)for(t=l.rules,r=0;r<t.length;r++)o=(s=t[r]).field,-1<T.inArray(o,e.ssfield)&&1<(a=s.data.split(e.splitSelect)).length&&(void
0===l.groups&&(l.groups=[]),i={groupOp:e.groupOpSelect,groups:[],rules:[]},l.groups.push(i),T.each(a,function(e){a[e]&&i.rules.push({data:a[e],op:s.op,field:s.field})}),t.splice(r,1),r--)}catch(e){}return l}}),T.jgrid.extend({filterToolbar:function(G){var
s=T.jgrid.getRegional(this[0],"search");return G=T.extend({autosearch:!0,autosearchDelay:500,searchOnEnter:!0,beforeSearch:null,afterSearch:null,beforeClear:null,afterClear:null,onClearSearchValue:null,url:"",stringResult:!1,groupOp:"AND",defaultSearch:"bw",searchOperators:!1,resetIcon:"x",splitSelect:",",groupOpSelect:"OR",errorcheck:!0,operands:{eq:"==",ne:"!",lt:"<",le:"<=",gt:">",ge:">=",bw:"^",bn:"!^",in:"=",ni:"!=",ew:"|",en:"!@",cn:"~",nc:"!~",nu:"#",nn:"!#",bt:"..."},disabledKeys:[9,16,17,18,19,20,33,34,35,36,37,38,39,40,30,45,112,113,114,115,116,117,118,119,120,121,122,123,144,145]},s,G||{}),this.each(function(){var
w=this,I=[];if(!w.p.filterToolbar){if(T(w).data("filterToolbar")||T(w).data("filterToolbar",G),w.p.force_regional&&(G=T.extend(G,s)),void
0!==w.p.customFilterDef)for(var
e
in
w.p.customFilterDef)w.p.customFilterDef.hasOwnProperty(e)&&!G.operands.hasOwnProperty(e)&&(G.odata.push({oper:e,text:w.p.customFilterDef[e].text}),G.operands[e]=w.p.customFilterDef[e].operand,!0===w.p.customFilterDef[e].unary)&&I.push(e);var
h,g,t,f=T.jgrid.styleUI[w.p.styleUI||"jQueryUI"].filter,c=T.jgrid.styleUI[w.p.styleUI||"jQueryUI"].common,m=T.jgrid.styleUI[w.p.styleUI||"jQueryUI"].base,y=function(e){void
0===e&&(e=1);var
r,s,a,i,o={},l=0,n={},p=!1,c=[],d=[],u={},h=[],g=!1,f=[!0,"",""],m=!1;if(T.each(w.p.colModel,function(){var
e,t=!1;if(s=this.index||this.name,i=this.searchoptions||{},!0===this.frozen&&!0===w.p.frozenColumns?(e=T("#gs_"+w.p.idPrefix+T.jgrid.jqID(this.name),w.grid.fhDiv),t=!0):e=T("#gs_"+w.p.idPrefix+T.jgrid.jqID(this.name),w.grid.hDiv),void
0===e[0]&&(e=T("#gs_"+w.p.idPrefix+T.jgrid.jqID(this.name),w.grid.hDiv)),a=G.searchOperators&&i.searchOperMenu?e.parents("table.ui-search-table").find("td.ui-search-oper").children("a").attr("soper")||G.defaultSearch:i.sopt?i.sopt[0]:"select"===this.stype?"eq":G.defaultSearch,"custom"===this.stype&&T.jgrid.isFunction(i.custom_value)&&0<e.length?(r=i.custom_value.call(w,e,"get"),h.push(s)):r=e.val(),"select"===this.stype&&i.multiple&&Array.isArray(r)?r=0<r.length?(p=!0,c.push(s),1===r.length?r[0]:r):"":"bt"!==a&&"text"===this.stype&&!0===i.splitSearchWord&&d.push(s),this.searchrules&&G.errorcheck&&(T.jgrid.isFunction(this.searchrules)?f=this.searchrules.call(w,r,this):T.jgrid&&T.jgrid.checkValues&&(f=T.jgrid.checkValues.call(w,r,-1,this.searchrules,this.label||this.name)),f)&&f.length&&!1===f[0])return this.searchrules.hasOwnProperty("validationError")&&(m=this.searchrules.validationError),!1;if("bt"===a&&(g=!0),t&&"cb"!==s&&"rn"!==s&&"subgrid"!==s&&"sc"!==s&&(u[s]=r),r||"nu"===a||"nn"===a||0<=T.inArray(a,I))o[s]=r,n[s]=a,l++;else
try{delete
w.p.postData[s]}catch(e){}}),!1===f[0])T.jgrid.isFunction(m)?m.call(w,f[1]):(y=T.jgrid.getRegional(w,"errors"),T.jgrid.info_dialog(y.errcap,f[1],"",{styleUI:w.p.styleUI}));else{var
t,y=0<l;if(!0===G.stringResult||"local"===w.p.datatype||!0===G.searchOperators){var
v,j,b,S,F,O,x='{"groupOp":"'+G.groupOp+'","rules":[',D=0;if(T.each(o,function(e,t){0<D&&(x+=","),x=(x=(x+='{"field":"'+e+'",')+'"op":"'+n[e]+'",')+'"data":"'+(t+="").replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"}',D++}),x+="]}",p&&(v=T.jgrid.filterRefactor({ruleGroup:x,ssfield:c,splitSelect:G.splitSelect,groupOpSelect:G.groupOpSelect})),g&&(v=T.isPlainObject(v)?v:T.jgrid.parse(x)).rules&&v.rules.length)for(j=v.rules,b=0;b<j.length;b++)"bt"===(S=j[b]).op&&1<(F=S.data.split("...")).length&&(void
0===v.groups&&(v.groups=[]),O={groupOp:"AND",groups:[],rules:[]},v.groups.push(O),T.each(F,function(e){F[e]&&O.rules.push({data:F[e],op:0===e?"ge":"le",field:S.field})}),j.splice(b,1),b--);d.length&&(v=T.jgrid.filterRefactor({ruleGroup:x,ssfield:d,splitSelect:i.splitSearchSeparator||";",groupOpSelect:"OR"})),(g||p||d.length)&&(x=JSON.stringify(v)),!0===w.p.mergeSearch&&w.p.searchModules.hasOwnProperty("filterToolbar")&&!1!==w.p.searchModules.filterToolbar?(w.p.searchModules.filterToolbar=0<D?x:null,y=!0,T.extend(w.p.postData,{filters:T.jgrid.splitSearch(w.p.searchModules)})):T.extend(w.p.postData,{filters:x}),T.each(["searchField","searchString","searchOper"],function(e,t){w.p.postData.hasOwnProperty(t)&&delete
w.p.postData[t]})}else
T.extend(w.p.postData,o);G.url&&(t=w.p.url,T(w).jqGrid("setGridParam",{url:G.url}));var
q="stop"===T(w).triggerHandler("jqGridToolbarBeforeSearch");(q=!q&&T.jgrid.isFunction(G.beforeSearch)?G.beforeSearch.call(w):q)||T(w).jqGrid("setGridParam",{search:y}).trigger("reloadGrid",[{page:e}]),t&&T(w).jqGrid("setGridParam",{url:t}),T(w).triggerHandler("jqGridToolbarAfterSearch"),T.jgrid.isFunction(G.afterSearch)&&G.afterSearch.call(w),w.p.frozenColumns&&_(u,n,c,h)}},_=function(e,i,t,o){var
l=T(".ui-search-toolbar",w.grid.hDiv),n=T(".ui-search-toolbar",w.grid.fhDiv);T.each(e,function(e,t){var
r,s,a;G.searchOperators&&(r=i[e])&&(T(".ui-search-table .ui-search-oper [colname='userId']",l).attr({soper:r}).text(G.operands[r]),T(".ui-search-table .ui-search-oper [colname='userId']",n).attr({soper:r}).text(G.operands[r])),-1<T.inArray(e,o)?(r=T.jgrid.getElemByAttrVal(w.p.colModel,"name",e))&&r.searchoptions&&(r=r.searchoptions||{},T.jgrid.isFunction(r.custom_value))&&(s=T("#gs_"+w.p.idPrefix+T.jgrid.jqID(e),w.grid.fhDiv),a=T("#gs_"+w.p.idPrefix+T.jgrid.jqID(e),w.grid.hDiv),r.custom_value.call(w,s,"set",t),r.custom_value.call(w,a,"set",t)):(T("#gs_"+w.p.idPrefix+T.jgrid.jqID(e),l).val(t),T("#gs_"+w.p.idPrefix+T.jgrid.jqID(e),n).val(t))})},v=T("<tr class='ui-search-toolbar' role='row'></tr>"),j=(G.restoreFromFilters&&(t=!0===w.p.mergeSearch&&w.p.searchModules.hasOwnProperty("filterToolbar")&&!1!==w.p.searchModules.filterToolbar?w.p.searchModules.filterToolbar:w.p.postData.filters)&&("string"==typeof
t&&(t=T.jgrid.parse(t)),g=!(!t.rules||!t.rules.length)&&t.rules),new
Set(G.disabledKeys));if(j.size!==G.disabledKeys.length)for(var
r=0;r<G.disabledKeys.length;r++)(j=new
Set).add(G.disabledKeys[r]);T.each(w.p.colModel,function(e){var
t,r,s,a,i=this,o="",l="=",n=T("<th role='columnheader' class='"+m.headerBox+" ui-th-"+w.p.direction+" "+(i.labelClasses||"")+"' id='gsh_"+w.p.id+"_"+i.name+"'></th>"),p=T("<div></div>"),c=T("<table class='ui-search-table' cellspacing='0'><tr><td class='ui-search-oper' headers=''></td><td class='ui-search-input' headers=''></td><td class='ui-search-clear' headers=''></td></tr></table>");if(!0===this.hidden&&T(n).css("display","none"),this.search=!1!==this.search,void
0===this.stype&&(this.stype="text"),this.searchoptions=this.searchoptions||{},void
0===this.searchoptions.searchOperMenu&&(this.searchoptions.searchOperMenu=!0),t=T.extend({},this.searchoptions,{name:i.index||i.name,id:"gs_"+w.p.idPrefix+i.name,oper:"search"}),this.search){if(G.restoreFromFilters&&g)for(var
d=!1,u=0;u<g.length;u++)if(g[u].field)if((i.index||i.name)===g[u].field){d=g[u];break}if(G.searchOperators){for(r=t.sopt?t.sopt[0]:"select"===i.stype?"eq":G.defaultSearch,G.restoreFromFilters&&d&&(r=d.op),s=0;s<G.odata.length;s++)if(G.odata[s].oper===r){l=G.operands[r]||"";break}a=null!=t.searchtitle?t.searchtitle:G.operandTitle,o=this.searchoptions.searchOperMenu?"<a title='"+a+"' soper='"+r+"' class='soptclass' colname='"+this.name+"'>"+l+"</a>":""}switch(T("td",c).eq(0).attr("columname",i.name).append(o),void
0===t.clearSearch&&(t.clearSearch=!0),t.clearSearch?(a=G.resetTitle||"Clear Search Value",T("td",c).eq(2).append("<a title='"+a+"' style='padding-right: 0.3em;padding-left: 0.3em;' class='clearsearchclass'>"+G.resetIcon+"</a>")):T("td",c).eq(2).hide(),this.surl&&(t.dataUrl=this.surl),a="",t.defaultValue&&(a=T.jgrid.isFunction(t.defaultValue)?t.defaultValue.call(w):t.defaultValue),G.restoreFromFilters&&d&&(a=d.data),a=T.jgrid.createEl.call(w,this.stype,t,a,!1,T.extend({},T.jgrid.ajaxOptions,w.p.ajaxSelectOptions||{})),"custom"!==this.stype&&("select"===this.stype?T(a).addClass(f.srSelect):T(a).addClass(f.srInput)),T("td",c).eq(1).append(a),T(p).append(c),null==t.dataEvents&&(t.dataEvents=[]),this.stype){case"select":!0===G.autosearch&&t.dataEvents.push({type:"change",fn:function(){return y(),!1}});break;case"text":case"custom":!0===G.autosearch&&(G.searchOnEnter?t.dataEvents.push({type:"keypress",fn:function(e){return 13===(e.charCode||e.keyCode||0)?(y(),!1):this}}):t.dataEvents.push({type:"keydown",fn:function(e){e=e.which;if(!j.has(e)){if(13===e)return!1;h&&clearTimeout(h),h=setTimeout(function(){y()},G.autosearchDelay)}}}))}T.jgrid.bindEv.call(w,a,t)}T(n).append(p),T(v).append(n),G.searchOperators&&""!==o||T("td",c).eq(0).hide()}),T("table thead",w.grid.hDiv).append(v),G.searchOperators&&(T(".soptclass",v).click(function(e){var
t=T(this).offset(),r=t.left,t=t.top,s=this;T("#sopt_menu").remove(),r=parseInt(r,10),t=parseInt(t,10)+18;var
a,i='<ul id="sopt_menu" class="ui-search-menu modal-content" role="menu" tabindex="0" style="font-size:'+(T(".ui-jqgrid").css("font-size")||"11px")+";left:"+r+"px;top:"+t+'px;">',o=T(s).attr("soper"),l=[],r=T(s).attr("colname"),n=T.jgrid.getElemByAttrVal(w.p.colModel,"name",r,!0);if(-1!==n){var
t=w.p.colModel[n],p=T.extend({},t.searchoptions);for(p.sopt||(p.sopt=[],p.sopt[0]="select"===t.stype?"eq":G.defaultSearch),T.each(G.odata,function(){l.push(this.oper)}),n=0;n<p.sopt.length;n++)-1!==(a=T.inArray(p.sopt[n],l))&&(i+='<li class="ui-menu-item '+(o===G.odata[a].oper?c.highlight:"")+'" role="presentation"><a class="'+c.cornerall+' g-menu-item" tabindex="0" role="menuitem" value="'+G.odata[a].oper+'" oper="'+G.operands[G.odata[a].oper]+'"><table class="ui-common-table"><tr><td class="opersign">'+G.operands[G.odata[a].oper]+"</td><td>"+G.odata[a].text+"</td></tr></table></a></li>");i+="</ul>",T("body").append(i),T("#sopt_menu").addClass("ui-menu "+f.menu_widget),T("#sopt_menu > li > a").hover(function(){T(this).addClass(c.hover)},function(){T(this).removeClass(c.hover)}).click(function(){var
e=T(this).attr("value"),t=T(this).attr("oper");T(w).triggerHandler("jqGridToolbarSelectOper",[e,t,s]),T("#sopt_menu").hide(),T(s).text(t).attr("soper",e),!0===G.autosearch&&(t=T(s).parent().next().children()[0],T(t).val()||"nu"===e||"nn"===e||0<=T.inArray(e,I))&&y()})}e.stopPropagation()}),T("body").on("click",function(e){"soptclass"!==e.target.className&&T("#sopt_menu").remove()})),T(".clearsearchclass",v).click(function(){var
e=T(this).parents("tr").first(),t=T("td.ui-search-oper",e).attr("columname"),r=T("td.ui-search-oper a",e).attr("soper");if(-1===(t=T.jgrid.getElemByAttrVal(w.p.colModel,"name",t,!0)))return!1;var
s,a,i,o=w.p.colModel[t],l=T.extend({},o.searchoptions||{}),n=l.defaultValue||"";"select"===o.stype?(s=T("td.ui-search-input select",e),n?s.val(n):s[0].selectedIndex=0):(s=T("td.ui-search-input input",e)).val(n),T(w).triggerHandler("jqGridToolbarClearVal",[s[0],t,l,n]),T.jgrid.isFunction(G.onClearSearchValue)&&G.onClearSearchValue.call(w,s[0],t,l,n),("nu"===r||"nn"===r||0<=T.inArray(r,I))&&(a=l.sopt?l.sopt[0]:"select"===o.stype?"eq":G.defaultSearch,i=null!=w.p.customFilterDef&&null!=w.p.customFilterDef[a]?w.p.customFilterDef[a].operand:G.operands[a]||"",(a===r?T("td.ui-search-oper a",e).attr("soper","dummy"):T("td.ui-search-oper a",e).attr("soper",a)).text(i)),!0===G.autosearch&&(y(),a===r)&&T("td.ui-search-oper a",e).attr("soper",a).text(i)}),T(w.grid.hDiv).on("scroll",function(e){w.grid.hScroll||(w.grid.bScroll=!0,w.grid.bDiv.scrollLeft=w.grid.hDiv.scrollLeft,w.p.footerrow&&(w.grid.sDiv.scrollLeft=w.grid.bDiv.scrollLeft),w.p.headerrow&&(w.grid.hrDiv.scrollLeft=w.grid.bDiv.scrollLeft)),w.grid.hScroll=!1}),this.p.filterToolbar=!0,this.triggerToolbar=y,this.clearToolbar=function(e){var
t,r,s,a,i,o,l={},n={},p=0,c=(e="boolean"!=typeof
e||e,T.each(w.p.colModel,function(){switch(r=T("#gs_"+w.p.idPrefix+T.jgrid.jqID(this.name),!0===this.frozen&&!0===w.p.frozenColumns?w.grid.fhDiv:w.grid.hDiv),this.searchoptions&&void
0!==this.searchoptions.defaultValue&&(s=this.searchoptions.defaultValue),t=this.index||this.name,n[t]=this.searchoptions&&this.searchoptions.sopt?this.searchoptions.sopt[0]:G.defaultSearch||"eq",this.stype){case"select":if(r.find("option").each(function(e){if(0===e&&(this.selected=!0),T(this).val()===s)return!(this.selected=!0)}),void
0!==s)l[t]=s,p++;else
try{delete
w.p.postData[t]}catch(e){}break;case"text":if(r.val(s||""),void
0!==s)l[t]=s,p++;else
try{delete
w.p.postData[t]}catch(e){}break;case"custom":T.jgrid.isFunction(this.searchoptions.custom_value)&&0<r.length&&this.searchoptions.custom_value.call(w,r,"set",s||"")}}),0<p),d=((w.p.resetsearch=!0)===G.stringResult||"local"===w.p.datatype?(a='{"groupOp":"'+G.groupOp+'","rules":[',i=0,T.each(l,function(e,t){0<i&&(a+=","),a=(a=(a+='{"field":"'+e+'",')+'"op":"'+n[e]+'",')+'"data":"'+(t+="").replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"}',i++,G.searchOperators&&(r=T("#gs_"+w.p.idPrefix+T.jgrid.jqID(e),!0===this.frozen&&!0===w.p.frozenColumns?w.grid.fhDiv:w.grid.hDiv)).parents("table.ui-search-table").find("td.ui-search-oper").children("a").attr("soper",n[e]).html(G.operands[n[e]])}),a+="]}",!0===w.p.mergeSearch&&w.p.searchModules.hasOwnProperty("filterToolbar")&&!1!==w.p.searchModules.filterToolbar?(w.p.searchModules.filterToolbar=0<i?a:null,c=!0,T.extend(w.p.postData,{filters:T.jgrid.splitSearch(w.p.searchModules)})):T.extend(w.p.postData,{filters:a}),T.each(["searchField","searchString","searchOper"],function(e,t){w.p.postData.hasOwnProperty(t)&&delete
w.p.postData[t]})):T.extend(w.p.postData,l),G.url&&(o=w.p.url,T(w).jqGrid("setGridParam",{url:G.url})),"stop"===T(w).triggerHandler("jqGridToolbarBeforeClear"));(d=!d&&T.jgrid.isFunction(G.beforeClear)?G.beforeClear.call(w):d)||e&&T(w).jqGrid("setGridParam",{search:c}).trigger("reloadGrid",[{page:1}]),o&&T(w).jqGrid("setGridParam",{url:o}),T(w).triggerHandler("jqGridToolbarAfterClear"),T.jgrid.isFunction(G.afterClear)&&G.afterClear()},this.toggleToolbar=function(){var
e=T("tr.ui-search-toolbar",w.grid.hDiv);!0===w.p.frozenColumns&&T(w).jqGrid("destroyFrozenColumns"),"none"===e.css("display")?e.show():e.hide(),!0===w.p.frozenColumns&&T(w).jqGrid("setFrozenColumns")}}})},destroyFilterToolbar:function(){return this.each(function(){this.p.filterToolbar&&(this.triggerToolbar=null,this.clearToolbar=null,this.toggleToolbar=null,this.p.filterToolbar=!1,T(this.grid.hDiv).find("table thead tr.ui-search-toolbar").remove())})},refreshFilterToolbar:function(g){return g=T.extend(!0,{filters:"",onClearVal:null,onSetVal:null},g||{}),this.each(function(){var
a,i,o,e,l,n,p,c=this,d=c.p.colModel,u=c.p.colModel.length,h=[];if(c.p.filterToolbar){for(i=T(c).data("filterToolbar"),a=0;a<u;a++){switch(h.push(d[a].index||d[a].name),o=T("#gs_"+c.p.idPrefix+T.jgrid.jqID(d[a].name)),d[a].stype){case"select":case"text":o.val("")}T.jgrid.isFunction(g.onClearVal)&&g.onClearVal.call(c,o,d[a].name)}"string"==typeof
g.filters&&(g.filters.length?e=g.filters:c.p.postData.hasOwnProperty("filters")&&(e=c.p.postData.filters),e=T.jgrid.parse(e)),T.isPlainObject(e)&&!function
e(t){if(t&&t.rules){for(l=t.rules,u=l.length,a=0;a<u;a++){var
r;n=l[a],-1!==(p=T.inArray(n.field,h))&&0<(o=T("#gs_"+c.p.idPrefix+T.jgrid.jqID(d[p].name))).length&&("select"===d[p].stype?o.find("option[value='"+T.jgrid.jqID(n.data)+"']").prop("selected",!0):"text"===d[p].stype&&o.val(n.data),T.jgrid.isFunction(g.onSetVal)&&g.onSetVal.call(c,o,d[p].name),i)&&i.searchOperators&&(r=o.parent().prev()).hasClass("ui-search-oper")&&(T(".soptclass",r).attr("soper",n.op),i.operands.hasOwnProperty(n.op))&&T(".soptclass",r).html(T.jgrid.stripScript(i.operands[n.op]))}if(t.groups)for(var
s=0;s<t.groups.length;s++)e(t.groups[s])}}(e)}})},searchGrid:function(C){var
e=T.jgrid.getRegional(this[0],"search");return C=T.extend(!0,{recreateFilter:!1,drag:!0,sField:"searchField",sValue:"searchString",sOper:"searchOper",sFilter:"filters",loadDefaults:!0,beforeShowSearch:null,afterShowSearch:null,onInitializeSearch:null,afterRedraw:null,afterChange:null,sortStrategy:null,closeAfterSearch:!1,closeAfterReset:!1,closeOnEscape:!1,searchOnEnter:!1,multipleSearch:!1,multipleGroup:!1,top:0,left:0,jqModal:!0,modal:!1,resize:!0,width:450,height:"auto",dataheight:"auto",showQuery:!1,errorcheck:!0,sopt:null,stringResult:void
0,onClose:null,onSearch:null,onReset:null,toTop:!0,overlay:30,columns:[],tmplNames:null,tmplFilters:null,tmplLabel:" Template: ",showOnLoad:!1,layer:null,splitSelect:",",groupOpSelect:"OR",operands:{eq:"=",ne:"<>",lt:"<",le:"<=",gt:">",ge:">=",bw:"LIKE",bn:"NOT LIKE",in:"IN",ni:"NOT IN",ew:"LIKE",en:"NOT LIKE",cn:"LIKE",nc:"NOT LIKE",nu:"IS NULL",nn:"ISNOT NULL"},buttons:[]},e,C||{}),this.each(function(){var
a=this;if(a.grid){var
t,r,s="fbox_"+a.p.id,i=!0,o=!0,l={themodal:"searchmod"+s,modalhead:"searchhd"+s,modalcontent:"searchcnt"+s,scrollelm:s},e=[],n=T.jgrid.styleUI[a.p.styleUI||"jQueryUI"].filter,p=T.jgrid.styleUI[a.p.styleUI||"jQueryUI"].common;if(C.styleUI=a.p.styleUI,"string"==typeof(t=T.isPlainObject(a.p._savedFilter)&&!T.isEmptyObject(a.p._savedFilter)?a.p._savedFilter:(!0===a.p.mergeSearch&&a.p.searchModules.hasOwnProperty("searchGrid")&&!1!==a.p.searchModules.searchGrid&&T.extend(a.p.postData,{filters:T.jgrid.splitSearch(a.p.searchModules)}),a.p.postData[C.sFilter]))&&(t=T.jgrid.parse(t)),!0===C.recreateFilter&&T("#"+T.jgrid.jqID(l.themodal)).remove(),void
0!==T("#"+T.jgrid.jqID(l.themodal))[0])G(T("#fbox_"+T.jgrid.jqID(a.p.id)));else{var
c,d,u=T("<div><div id='"+s+"' class='searchFilter' style='overflow:auto'></div></div>").insertBefore("#gview_"+T.jgrid.jqID(a.p.id)),h="left",g="",f=("rtl"===a.p.direction&&(h="right",g=" style='text-align:left'",u.attr("dir","rtl")),T.extend([],a.p.colModel)),m="<a id='"+s+"_search' class='fm-button "+p.button+" fm-button-icon-right ui-search'><span class='"+p.icon_base+" "+n.icon_search+"'></span>"+C.Find+"</a>",y="<a id='"+s+"_reset' class='fm-button "+p.button+" fm-button-icon-left ui-reset'><span class='"+p.icon_base+" "+n.icon_reset+"'></span>"+C.Reset+"</a>",v="",j="",b=!1,S=-1,F=!1,O=[],m=(C.showQuery&&(v="<a id='"+s+"_query' class='fm-button "+p.button+" fm-button-icon-left'><span class='"+p.icon_base+" "+n.icon_query+"'></span>Query</a>"),T.jgrid.buildButtons(C.buttons,v+m,p)),x=null;if(T(a).jqGrid("isGroupHeaderOn")&&(_=T("table.ui-jqgrid-htable",a.grid.hDiv).find(".jqg-second-row-header"),d=a.p.groupHeader.length,void
0!==_[0])&&(x=a.p.groupHeader[d-1]),C.columns.length)f=C.columns,c=f[S=0].index||f[0].name;else{if(null!==x)for(var
D=0;D<f.length;D++){var
q=T.jgrid.inColumnHeader(f[D].name,x.groupHeaders);if(0<=q){f[D].label=x.groupHeaders[q].titleText+"::"+a.p.colNames[D];for(var
w=1;w<=x.groupHeaders[q].numberOfColumns-1;w++)f[D+w].label=x.groupHeaders[q].titleText+"::"+a.p.colNames[D+w];D=D+x.groupHeaders[q].numberOfColumns-1}}T.each(f,function(e,t){var
r,s;t.label||(t.label=a.p.colNames[e]),!b&&(r=void
0===t.search||t.search,s=!0===t.hidden,t.searchoptions&&!0===t.searchoptions.searchhidden&&r||r&&!s)&&(b=!0,c=t.index||t.name,S=e),"select"===t.stype&&t.searchoptions&&t.searchoptions.multiple&&(F=!0,O.push(t.index||t.name))})}if((!t&&c||!1===C.multipleSearch)&&(_="eq",0<=S&&f[S].searchoptions&&f[S].searchoptions.sopt?_=f[S].searchoptions.sopt[0]:C.sopt&&C.sopt.length&&(_=C.sopt[0]),t={groupOp:"AND",rules:[{field:c,op:_,data:""}]}),b=!1,C.tmplNames&&C.tmplNames.length&&(b=!0,j=(j="<tr><td class='ui-search-label'>"+C.tmplLabel+"</td>")+"<td><select size='1' class='ui-template "+n.srSelect+"'><option value='default'>Default</option>",T.each(C.tmplNames,function(e,t){j+="<option value='"+e+"'>"+t+"</option>"}),j+="</select></td></tr>"),void
0!==a.p.customFilterDef)for(var
I
in
a.p.customFilterDef)a.p.customFilterDef.hasOwnProperty(I)&&!C.operands.hasOwnProperty(I)&&(C.odata.push({oper:I,text:a.p.customFilterDef[I].text}),C.operands[I]=a.p.customFilterDef[I].operand,!0===a.p.customFilterDef[I].unary)&&e.push(I);d="<table class='EditTable' style='border:0px none;margin-top:5px' id='"+s+"_2'><tbody><tr><td colspan='2'><hr class='"+p.content+"' style='margin:1px'/></td></tr>"+j+"<tr><td class='EditButton' style='text-align:"+h+"'>"+y+"</td><td class='EditButton' "+g+">"+m+"</td></tr></tbody></table>",s=T.jgrid.jqID(s),T("#"+s).jqFilter({columns:f,sortStrategy:C.sortStrategy,filter:C.loadDefaults?t:null,showQuery:C.showQuery,errorcheck:C.errorcheck,sopt:C.sopt,groupButton:C.multipleGroup,ruleButtons:C.multipleSearch,uniqueSearchFields:C.uniqueSearchFields,afterRedraw:C.afterRedraw,ops:C.odata,operands:C.operands,ajaxSelectOptions:a.p.ajaxSelectOptions,groupOps:C.groupOps,addsubgrup:C.addsubgrup,addrule:C.addrule,delgroup:C.delgroup,delrule:C.delrule,autoencode:a.p.autoencode,unaryOperations:e,onChange:function(){this.p.showQuery&&T(".query",this).text(this.toUserFriendlyString()),T.jgrid.isFunction(C.afterChange)&&C.afterChange.call(a,T("#"+s),C)},direction:a.p.direction,id:a.p.id}),u.append(d),T("#"+s+"_2").find("[data-index]").each(function(){var
t=parseInt(T(this).attr("data-index"),10);0<=t&&T(this).on("click",function(e){C.buttons[t].click.call(a,T("#"+s),C,e)})}),b&&C.tmplFilters&&C.tmplFilters.length&&T(".ui-template",u).on("change",function(){var
e=T(this).val();return"default"===e?T("#"+s).jqFilter("addFilter",t):T("#"+s).jqFilter("addFilter",C.tmplFilters[parseInt(e,10)]),!1}),!0===C.multipleGroup&&(C.multipleSearch=!0),T(a).triggerHandler("jqGridFilterInitialize",[T("#"+s)]),T.jgrid.isFunction(C.onInitializeSearch)&&C.onInitializeSearch.call(a,T("#"+s)),C.gbox="#gbox_"+T.jgrid.jqID(a.p.id);var
_=T(".ui-jqgrid").css("font-size")||"11px";C.layer?T.jgrid.createModal(l,u,C,"#gview_"+T.jgrid.jqID(a.p.id),T("#gbox_"+T.jgrid.jqID(a.p.id))[0],"string"==typeof
C.layer?"#"+T.jgrid.jqID(C.layer):C.layer,"string"==typeof
C.layer?{position:"relative","font-size":_}:{"font-size":_}):T.jgrid.createModal(l,u,C,"#gview_"+T.jgrid.jqID(a.p.id),T("#gbox_"+T.jgrid.jqID(a.p.id))[0],null,{"font-size":_}),(C.searchOnEnter||C.closeOnEscape)&&T("#"+T.jgrid.jqID(l.themodal)).keydown(function(e){var
t=T(e.target);return!C.searchOnEnter||13!==e.which||t.hasClass("add-group")||t.hasClass("add-rule")||t.hasClass("delete-group")||t.hasClass("delete-rule")||t.hasClass("fm-button")&&t.is("[id$=_query]")?C.closeOnEscape&&27===e.which?(T("#"+T.jgrid.jqID(l.modalhead)).find(".ui-jqdialog-titlebar-close").click(),!1):void
0:(T("#"+s+"_search").click(),!1)}),v&&T("#"+s+"_query").on("click",function(){return T(".queryresult",u).toggle(),!1}),void
0===C.stringResult&&(C.stringResult=C.multipleSearch),T("#"+s+"_search").on("click",function(){var
e,t={};return(r=T("#"+s)).find(".input-elm:focus").change(),F&&C.multipleSearch?(a.p._savedFilter={},e=T.jgrid.filterRefactor({ruleGroup:T.extend(!0,{},r.jqFilter("filterData")),ssfield:O,splitSelect:C.splitSelect,groupOpSelect:C.groupOpSelect}),a.p._savedFilter=T.extend(!0,{},r.jqFilter("filterData"))):e=r.jqFilter("filterData"),C.errorcheck&&(r[0].hideError(),C.showQuery||r.jqFilter("toSQLString"),r[0].p.error)?r[0].showError():(C.stringResult?(t[C.sFilter]=JSON.stringify(e),T.each([C.sField,C.sValue,C.sOper],function(){t[this]=""})):C.multipleSearch?(t[C.sFilter]=e,T.each([C.sField,C.sValue,C.sOper],function(){t[this]=""})):(t[C.sField]=e.rules[0].field,t[C.sValue]=e.rules[0].data,t[C.sOper]=e.rules[0].op,t[C.sFilter]=""),"string"!=typeof
t[C.sFilter]&&(t[C.sFilter]=JSON.stringify(t[C.sFilter])),(a.p.search=!0)===a.p.mergeSearch&&a.p.searchModules.hasOwnProperty("searchGrid")&&!1!==a.p.searchModules.searchGrid&&C.multipleSearch?(""!==t[C.sFilter]?a.p.searchModules.searchGrid=t[C.sFilter]:a.p.searchModules.searchGrid=null,T.extend(a.p.postData,{filters:T.jgrid.splitSearch(a.p.searchModules)})):T.extend(a.p.postData,t),!1!==(o=(o=void
0===(o=T(a).triggerHandler("jqGridFilterSearch"))?!0:o)&&T.jgrid.isFunction(C.onSearch)?C.onSearch.call(a,a.p.filters):o)&&T(a).trigger("reloadGrid",[{page:1}]),C.closeAfterSearch&&T.jgrid.hideModal("#"+T.jgrid.jqID(l.themodal),{gb:"#gbox_"+T.jgrid.jqID(a.p.id),jqm:C.jqModal,onClose:C.onClose})),!1}),T("#"+s+"_reset").on("click",function(){var
e={},t=T("#"+s);return a.p.search=!1,!(a.p.resetsearch=!0)===C.multipleSearch?e[C.sField]=e[C.sValue]=e[C.sOper]="":e[C.sFilter]="",t[0].resetFilter(),b&&T(".ui-template",u).val("default"),!0===a.p.mergeSearch&&a.p.searchModules.hasOwnProperty("searchGrid")&&!1!==a.p.searchModules.searchGrid?(a.p.searchModules.searchGrid=null,T.extend(a.p.postData,{filters:T.jgrid.splitSearch(a.p.searchModules)}),a.p.search=!0):T.extend(a.p.postData,e),!1!==(o=(o=void
0===(o=T(a).triggerHandler("jqGridFilterReset"))?!0:o)&&T.jgrid.isFunction(C.onReset)?C.onReset.call(a):o)&&T(a).trigger("reloadGrid",[{page:1}]),C.closeAfterReset&&T.jgrid.hideModal("#"+T.jgrid.jqID(l.themodal),{gb:"#gbox_"+T.jgrid.jqID(a.p.id),jqm:C.jqModal,onClose:C.onClose}),!1}),G(T("#"+s)),T(".fm-button:not(."+p.disabled+")",u).hover(function(){T(this).addClass(p.hover)},function(){T(this).removeClass(p.hover)})}}function
G(e){(i=(i=void
0===(i=T(a).triggerHandler("jqGridFilterBeforeShow",[e]))?!0:i)&&T.jgrid.isFunction(C.beforeShowSearch)?C.beforeShowSearch.call(a,e):i)&&(T.jgrid.viewModal("#"+T.jgrid.jqID(l.themodal),{gbox:"#gbox_"+T.jgrid.jqID(a.p.id),jqm:C.jqModal,modal:C.modal,overlay:C.overlay,toTop:C.toTop}),T(a).triggerHandler("jqGridFilterAfterShow",[e]),T.jgrid.isFunction(C.afterShowSearch))&&C.afterShowSearch.call(a,e)}})},filterInput:function(o,l){return l=T.extend(!0,{defaultSearch:"cn",groupOp:"OR",searchAll:!1,beforeSearch:null,afterSearch:null,selectFirstFound:!1,firstFoundTimeout:30},l||{}),this.each(function(){var
e,t,r,s,a,i=this;i.grid&&(t='{"groupOp":"'+l.groupOp+'","rules":[',r=0,o+="",T.each(i.p.colModel,function(){e=this.index||this.name,s=this.searchoptions||{},s=l.defaultSearch||(s.sopt?s.sopt[0]:l.defaultSearch),(void
0===this.search||this.search||l.searchAll)&&(0<r&&(t+=","),t=(t=t+'{"field":"'+e+'","op":"'+s+'",')+'"data":"'+o.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"}',r++)}),t+="]}",!0===i.p.mergeSearch&&i.p.searchModules.hasOwnProperty("filterInput")&&!1!==i.p.searchModules.filterInput?(i.p.searchModules.filterInput=0<r?t:null,T.extend(i.p.postData,{filters:T.jgrid.splitSearch(i.p.searchModules)})):T.extend(i.p.postData,{filters:t}),T.each(["searchField","searchString","searchOper"],function(e,t){i.p.postData.hasOwnProperty(t)&&delete
i.p.postData[t]}),(a=!(a="stop"===T(i).triggerHandler("jqGridFilterInputBeforeSearch"))&&T.jgrid.isFunction(l.beforeSearch)?l.beforeSearch.call(i):a)||T(i).jqGrid("setGridParam",{search:!0}).trigger("reloadGrid",[{page:1}]),l.selectFirstFound&&setTimeout(function(){var
e=T(i).jqGrid("getGridRowByIndex",1);T(i).jqGrid("setSelection",e.id,!1)},l.firstFoundTimeout),T(i).triggerHandler("jqGridFilterInputAfterSearch"),T.jgrid.isFunction(l.afterSearch))&&l.afterSearch.call(i)})},autoSelect:function(n){return n=T.extend(!0,{field:"",direction:"asc",src_date:"Y-m-d",allValues:"All",count_item:!0,create_value:!0},n||{}),this.each(function(){var
e,t=this,r="";if(n.field&&t.p.data&&Array.isArray(t.p.data)){var
s,a,i,o,l=[];try{o=(i=T.jgrid.from.call(t,t.p.data).groupBy(n.field,n.direction,"text",n.src_date)).length}catch(e){}if(i&&i.length){for(a=T("#gsh_"+t.p.id+"_"+n.field).find("td.ui-search-input > select"),o=i.length,n.allValues&&(r="<option value=''>"+n.allValues+"</option>",l.push(":"+n.allValues));o--;)e=i[o],s=n.count_item?" ("+e.items.length+")":"",r+="<option value='"+e.unique+"'>"+e.unique+s+"</option>",l.push(e.unique+":"+e.unique+s);a.append(r),a.on("change",function(){t.triggerToolbar()}),n.create_value&&(a=T.jgrid.getElemByAttrVal(t.p.colModel,"name",n.field,!1),T.isEmptyObject(a)||(a.searchoptions?T.extend(a.searchoptions,{value:l.join(";")}):(a.searchoptions={},a.searchoptions.value=l.join(";"))))}}})}})});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.base","./grid.common"],e):e(jQuery)}(function(Z){"use strict";var
$={};Z.jgrid.extend({editGridRow:function(X,Y){var
e=Z.jgrid.getRegional(this[0],"edit"),t=this[0].p.styleUI,J=Z.jgrid.styleUI[t].formedit,K=Z.jgrid.styleUI[t].common;return Y=Z.extend(!0,{top:0,left:0,width:"500",datawidth:"auto",height:"auto",dataheight:"auto",modal:!1,overlay:30,drag:!0,resize:!0,url:null,mtype:"POST",clearAfterAdd:!0,closeAfterEdit:!1,reloadAfterSubmit:!0,onInitializeForm:null,beforeInitData:null,beforeShowForm:null,afterShowForm:null,beforeSubmit:null,afterSubmit:null,onclickSubmit:null,afterComplete:null,onclickPgButtons:null,afterclickPgButtons:null,editData:{},recreateForm:!1,jqModal:!0,closeOnEscape:!1,addedrow:"first",topinfo:"",bottominfo:"",saveicon:[],closeicon:[],savekey:[!1,13],navkeys:[!1,38,40],checkOnSubmit:!1,checkOnUpdate:!1,processing:!1,onClose:null,ajaxEditOptions:{},serializeEditData:null,viewPagerButtons:!0,overlayClass:K.overlay,removemodal:!0,form:"edit",template:null,focusField:!0,editselected:!1,html5Check:!1,buttons:[]},e,Y||{}),$[Z(this)[0].p.id]=Y,this.each(function(){var
p=this;if(p.grid&&X){p.p.savedData={};var
u,h,i,e,g=p.p.id,m="FrmGrid_"+g,t="TblGrid_"+g,f="#"+Z.jgrid.jqID(t),j={themodal:"editmod"+g,modalhead:"edithd"+g,modalcontent:"editcnt"+g,scrollelm:m},a=!0,d=1,r=0,o="string"==typeof
$[p.p.id].template&&0<$[p.p.id].template.length,v=Z.jgrid.getRegional(this,"errors"),M=($[p.p.id].styleUI=p.p.styleUI||"jQueryUI",Z.jgrid.isMobile()&&($[p.p.id].resize=!1),"new"===X?(X="_empty",h="add",Y.caption=$[p.p.id].addCaption):(Y.caption=$[p.p.id].editCaption,h="edit"),Y.recreateForm||Z(p).data("formProp")&&Z.extend($[Z(this)[0].p.id],Z(p).data("formProp")),!0),n=(Y.checkOnUpdate&&Y.jqModal&&!Y.modal&&(M=!1),isNaN($[Z(this)[0].p.id].dataheight)?$[Z(this)[0].p.id].dataheight:$[Z(this)[0].p.id].dataheight+"px"),l=isNaN($[Z(this)[0].p.id].datawidth)?$[Z(this)[0].p.id].datawidth:$[Z(this)[0].p.id].datawidth+"px",b=Z("<form name='FormPost' id='"+m+"' class='FormGrid' onSubmit='return false;' style='width:"+l+";height:"+n+";'></form>").data("disabled",!1),s=o?(l=$[Z(this)[0].p.id].template,n="",i=n="string"==typeof
l?l.replace(/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,function(e,t){return'<span id="'+t+'" ></span>'}):n,f):(i=Z("<table id='"+t+"' class='EditTable ui-common-table'><tbody></tbody></table>"),f+"_2"),m="#"+Z.jgrid.jqID(m);if(Z(b).append("<div class='FormError "+K.error+"' style='display:none;'></div>"),Z(b).append("<div class='tinfo topinfo'>"+$[p.p.id].topinfo+"</div>"),Z(p.p.colModel).each(function(){var
e=this.formoptions;d=Math.max(d,e&&e.colpos||0),r=Math.max(r,e&&e.rowpos||0)}),Z(b).append(i),!1!==(a=(a=void
0===(a=Z(p).triggerHandler("jqGridAddEditBeforeInitData",[b,h]))?!0:a)&&Z.jgrid.isFunction($[p.p.id].beforeInitData)?$[p.p.id].beforeInitData.call(p,b,h):a)){if("_empty"!==X&&void
0!==p.p.savedRow&&0<p.p.savedRow.length&&Z.jgrid.isFunction(Z.fn.jqGrid.restoreRow))for(e=0;e<p.p.savedRow.length;e++)if(p.p.savedRow[e].id===X){Z(p).jqGrid("restoreRow",X);break}for(var
c,w,D,y,B,q,x,_=X,I=p,k=i,C=d,F=0,G=!1,R="",U=1;U<=C;U++)R+="<td class='CaptionTD'></td><td class='DataTD'></td>";"_empty"!==_&&(G=Z(I).jqGrid("getInd",_)),Z(I.p.colModel).each(function(t){if(c=this.name,w=(!this.editrules||!0!==this.editrules.edithidden)&&!0===this.hidden,B=w?"style='display:none'":"","cb"!==c&&"subgrid"!==c&&!0===this.editable&&"rn"!==c&&"sc"!==c){if(!1===G)y="";else
if(c===I.p.ExpandColumn&&!0===I.p.treeGrid)y=Z("td[role='gridcell']",I.rows[G]).eq(t).text();else{try{y=Z.unformat.call(I,Z("td[role='gridcell']",I.rows[G]).eq(t),{rowId:_,colModel:this},t)}catch(e){y=this.edittype&&"textarea"===this.edittype?Z("td[role='gridcell']",I.rows[G]).eq(t).text():Z("td[role='gridcell']",I.rows[G]).eq(t).html()}y&&"&nbsp;"!==y&&"&#160;"!==y&&(1!==y.length||160!==y.charCodeAt(0))||(y="")}var
e,i=Z.extend({},this.editoptions||{},{id:c,name:c,rowId:_,oper:h,module:"form",checkUpdate:$[p.p.id].checkOnSubmit||$[p.p.id].checkOnUpdate}),a=Z.extend({},{elmprefix:"",elmsuffix:"",rowabove:!1,rowcontent:""},this.formoptions||{}),d=parseInt(a.rowpos,10)||F+1,r=parseInt(2*(parseInt(a.colpos,10)||1),10);"_empty"===_&&i.defaultValue&&(y=Z.jgrid.isFunction(i.defaultValue)?i.defaultValue.call(p):i.defaultValue),this.edittype||(this.edittype="text"),p.p.autoencode&&(y=Z.jgrid.htmlDecode(y)),q=Z.jgrid.createEl.call(p,this.edittype,i,y,!1,Z.extend({},Z.jgrid.ajaxOptions,I.p.ajaxSelectOptions||{})),"select"===this.edittype&&(y=Z(q).val(),"select-multiple"===Z(q).get(0).type)&&(y=y&&y.join(",")),"checkbox"===this.edittype&&(y=Z(q).is(":checked")?Z(q).val():Z(q).attr("offval")),Z(q).addClass("FormElement"),"select"===this.edittype?Z(q).addClass(J.selectClass):-1<Z.inArray(this.edittype,["text","textarea","password","color","date","datetime","datetime-local","email","month","number","range","search","tel","time","url","week"])&&Z(q).addClass(J.inputClass),x=!0,o?(e=Z(b).find("#"+c)).length?e.replaceWith(q):x=!1:(D=Z(k).find("tr[rowpos="+d+"]"),a.rowabove&&(e=Z("<tr><td class='contentinfo' colspan='"+2*C+"'>"+a.rowcontent+"</td></tr>"),Z(k).append(e),e[0].rp=d),0===D.length&&(D=Z(1<C?"<tr rowpos='"+d+"'></tr>":"<tr "+B+" rowpos='"+d+"'></tr>").addClass("FormData").attr("id","tr_"+c),Z(D).append(R),Z(k).append(D),D[0].rp=d),Z("td",D[0]).eq(r-2).html("<label for='"+c+"'>"+(void
0===a.label?I.p.colNames[t]:a.label)+"</label>"),Z("td",D[0]).eq(r-1).append(a.elmprefix).append(q).append(a.elmsuffix),1<C&&w&&(Z("td",D[0]).eq(r-2).hide(),Z("td",D[0]).eq(r-1).hide())),($[p.p.id].checkOnSubmit||$[p.p.id].checkOnUpdate)&&x&&(p.p.savedData[c]=y),"custom"===this.edittype&&Z.jgrid.isFunction(i.custom_value)&&i.custom_value.call(p,Z("#"+c,q),"set",y),Z.jgrid.bindEv.call(p,q,i),F,F++}}),0<F&&((o?(P="<div class='FormData' style='display:none'><input class='FormElement' id='id_g' type='text' name='"+I.p.id+"_id' value='"+_+"'/>",Z(b)):((P=Z("<tr class='FormData' style='display:none'><td class='CaptionTD'></td><td colspan='"+(2*C-1)+"' class='DataTD'><input class='FormElement' id='id_g' type='text' name='"+I.p.id+"_id' value='"+_+"'/></td></tr>"))[0].rp=F+999,Z(k))).append(P),$[p.p.id].checkOnSubmit||$[p.p.id].checkOnUpdate)&&(p.p.savedData[I.p.id+"_id"]=_);var
O,l="rtl"===p.p.direction,n="<a id='"+(l?"nData":"pData")+"' class='fm-button "+K.button+"'><span class='"+K.icon_base+" "+J.icon_prev+"'></span></a>",a="<a id='"+(l?"pData":"nData")+"' class='fm-button "+K.button+"'><span class='"+K.icon_base+" "+J.icon_next+"'></span></a>",P="<a id='sData' class='fm-button "+K.button+"'>"+Y.bSubmit+"</a>",S="<a id='cData' class='fm-button "+K.button+"'>"+Y.bCancel+"</a>",E=Array.isArray($[p.p.id].buttons)?Z.jgrid.buildButtons($[p.p.id].buttons,P+S,K):P+S,E="<table style='height:auto' class='EditTable ui-common-table' id='"+t+"_2'><tbody><tr><td colspan='2'><hr class='"+K.content+"' style='margin:1px'/></td></tr><tr id='Act_Buttons'><td class='navButton'>"+(l?a+n:n+a)+"</td><td class='EditButton'>"+E+"</td></tr>",T=(E+="</tbody></table>",0<r&&(O=[],Z.each(Z(i)[0].rows,function(e,t){O[e]=t}),O.sort(function(e,t){return e.rp>t.rp?1:e.rp<t.rp?-1:0}),Z.each(O,function(e,t){Z("tbody",i).append(t)})),Y.gbox="#gbox_"+Z.jgrid.jqID(g),!1),t=(!0===Y.closeOnEscape&&(Y.closeOnEscape=!1,T=!0),n=o?(Z(b).find("#pData").replaceWith(n),Z(b).find("#nData").replaceWith(a),Z(b).find("#sData").replaceWith(P),Z(b).find("#cData").replaceWith(S),Z("<div id="+t+"></div>").append(b)):Z("<div></div>").append(b).append(E),Z(b).append("<div class='binfo topinfo bottominfo'>"+$[p.p.id].bottominfo+"</div>"),Z(".ui-jqgrid").css("font-size")||"11px"),t=(Z.jgrid.createModal(j,n,$[Z(this)[0].p.id],"#gview_"+Z.jgrid.jqID(p.p.id),Z("#gbox_"+Z.jgrid.jqID(p.p.id))[0],null,{"font-size":t}),l&&(Z("#pData, #nData",f+"_2").css("float","right"),Z(".EditButton",f+"_2").css("text-align","left")),$[p.p.id].topinfo&&Z(".tinfo",m).show(),$[p.p.id].bottominfo&&Z(".binfo",m).show(),n=null,Z("#"+Z.jgrid.jqID(j.themodal)).keydown(function(e){var
t=e.target;return!0!==Z(m).data("disabled")&&(!0===$[p.p.id].savekey[0]&&e.which===$[p.p.id].savekey[1]&&"TEXTAREA"!==t.tagName?(Z("#sData",f+"_2").trigger("click"),!1):27===e.which?(A()&&T&&Z.jgrid.hideModal("#"+Z.jgrid.jqID(j.themodal),{gb:Y.gbox,jqm:Y.jqModal,onClose:$[p.p.id].onClose,removemodal:$[p.p.id].removemodal,formprop:!$[p.p.id].recreateForm,form:$[p.p.id].form}),!1):!0===$[p.p.id].navkeys[0]?"_empty"===Z("#id_g",f).val()||(e.which===$[p.p.id].navkeys[1]?(Z("#pData",s).trigger("click"),!1):e.which===$[p.p.id].navkeys[2]?(Z("#nData",s).trigger("click"),!1):void
0):void
0)}),Y.checkOnUpdate&&(Z("a.ui-jqdialog-titlebar-close span","#"+Z.jgrid.jqID(j.themodal)).removeClass("jqmClose"),Z("a.ui-jqdialog-titlebar-close","#"+Z.jgrid.jqID(j.themodal)).off("click").click(function(){return A()&&Z.jgrid.hideModal("#"+Z.jgrid.jqID(j.themodal),{gb:"#gbox_"+Z.jgrid.jqID(g),jqm:Y.jqModal,onClose:$[p.p.id].onClose,removemodal:$[p.p.id].removemodal,formprop:!$[p.p.id].recreateForm,form:$[p.p.id].form}),!1})),Y.saveicon=Z.extend([!0,"left",J.icon_save],Y.saveicon),Y.closeicon=Z.extend([!0,"left",J.icon_close],Y.closeicon),!0===Y.saveicon[0]&&Z("#sData",s).addClass("right"===Y.saveicon[1]?"fm-button-icon-right":"fm-button-icon-left").append("<span class='"+K.icon_base+" "+Y.saveicon[2]+"'></span>"),!0===Y.closeicon[0]&&Z("#cData",s).addClass("right"===Y.closeicon[1]?"fm-button-icon-right":"fm-button-icon-left").append("<span class='"+K.icon_base+" "+Y.closeicon[2]+"'></span>"),($[p.p.id].checkOnSubmit||$[p.p.id].checkOnUpdate)&&(P="<a id='sNew' class='fm-button "+K.button+"' style='z-index:1002'>"+Y.bYes+"</a>",a="<a id='nNew' class='fm-button "+K.button+"' style='z-index:1002;margin-left:5px'>"+Y.bNo+"</a>",S="<a id='cNew' class='fm-button "+K.button+"' style='z-index:1002;margin-left:5px;'>"+Y.bExit+"</a>",E=Y.zIndex||999,E++,Z("#"+j.themodal).append("<div class='"+Y.overlayClass+" jqgrid-overlay confirm' style='z-index:"+E+";display:none;position:absolute;'>&#160;</div><div class='confirm ui-jqconfirm "+K.content+"' style='z-index:"+(1+E)+"'>"+Y.saveData+"<br/><br/>"+P+a+S+"</div>"),Z("#sNew","#"+Z.jgrid.jqID(j.themodal)).click(function(){return H(),Z(m).data("disabled",!1),Z(".confirm","#"+Z.jgrid.jqID(j.themodal)).hide(),!1}),Z("#nNew","#"+Z.jgrid.jqID(j.themodal)).click(function(){return Z(".confirm","#"+Z.jgrid.jqID(j.themodal)).hide(),Z(m).data("disabled",!1),setTimeout(function(){Z(":input:visible",m)[0].focus()},0),!1}),Z("#cNew","#"+Z.jgrid.jqID(j.themodal)).click(function(){return Z(".confirm","#"+Z.jgrid.jqID(j.themodal)).hide(),Z(m).data("disabled",!1),Z.jgrid.hideModal("#"+Z.jgrid.jqID(j.themodal),{gb:"#gbox_"+Z.jgrid.jqID(g),jqm:Y.jqModal,onClose:$[p.p.id].onClose,removemodal:$[p.p.id].removemodal,formprop:!$[p.p.id].recreateForm,form:$[p.p.id].form}),!1})),Z(p).triggerHandler("jqGridAddEditInitializeForm",[Z(m),h]),Z.jgrid.isFunction($[p.p.id].onInitializeForm)&&$[p.p.id].onInitializeForm.call(p,Z(m),h),"_empty"!==X&&$[p.p.id].viewPagerButtons?Z("#pData,#nData",s).show():Z("#pData,#nData",s).hide(),Z(p).triggerHandler("jqGridAddEditBeforeShowForm",[Z(m),h]),Z.jgrid.isFunction($[p.p.id].beforeShowForm)&&$[p.p.id].beforeShowForm.call(p,Z(m),h),Q(),Z("#"+Z.jgrid.jqID(j.themodal)).data("onClose",$[p.p.id].onClose),Z.jgrid.viewModal("#"+Z.jgrid.jqID(j.themodal),{gbox:"#gbox_"+Z.jgrid.jqID(g),jqm:Y.jqModal,overlay:Y.overlay,modal:Y.modal,overlayClass:Y.overlayClass,focusField:Y.focusField,onHide:function(e){var
t=Z.jgrid.floatNum(Z("#editmod"+g)[0].style.width),i="rtl"===Z("#gbox_"+Z.jgrid.jqID(g)).attr("dir"),a=Z("#editmod"+g)[0].style.height,a=["100%","auto"].includes(a)?a:Z.jgrid.floatNum(a,200);Z(p).data("formProp",{top:Z.jgrid.floatNum(Z(e.w).css("top")),left:i?Z("#gbox_"+Z.jgrid.jqID(g)).outerWidth()-t-parseFloat(Z(e.w).css("left"))+12:parseFloat(Z(e.w).css("left")),width:t,height:a,dataheight:Z(m).height(),datawidth:Z(m).width()}),e.w.remove(),e.o&&e.o.remove()}}),M||Z("."+Z.jgrid.jqID(Y.overlayClass)).click(function(){return A()&&Z.jgrid.hideModal("#"+Z.jgrid.jqID(j.themodal),{gb:"#gbox_"+Z.jgrid.jqID(g),jqm:Y.jqModal,onClose:$[p.p.id].onClose,removemodal:$[p.p.id].removemodal,formprop:!$[p.p.id].recreateForm,form:$[p.p.id].form}),!1}),Z(".fm-button","#"+Z.jgrid.jqID(j.themodal)).hover(function(){Z(this).addClass(K.hover)},function(){Z(this).removeClass(K.hover)}),Z("#sData",s).click(function(){return u={},Z(".FormError",m).hide(),N(),"_empty"!==u[p.p.id+"_id"]&&!0===Y.checkOnSubmit&&V(u,p.p.savedData)?(Z(m).data("disabled",!0),Z(".confirm","#"+Z.jgrid.jqID(j.themodal)).show()):H(),!1}),Z("#cData",s).click(function(){return A()&&Z.jgrid.hideModal("#"+Z.jgrid.jqID(j.themodal),{gb:"#gbox_"+Z.jgrid.jqID(g),jqm:Y.jqModal,onClose:$[p.p.id].onClose,removemodal:$[p.p.id].removemodal,formprop:!$[p.p.id].recreateForm,form:$[p.p.id].form}),!1}),Z(s).find("[data-index]").each(function(){var
t=parseInt(Z(this).attr("data-index"),10);0<=t&&Y.buttons[t].hasOwnProperty("click")&&Z(this).on("click",function(e){Y.buttons[t].click.call(p,Z(m)[0],$[p.p.id],e)})}),Z("#nData",s).click(function(){if(A()){Z(".FormError",m).hide();var
e,t=L();if(t[0]=parseInt(t[0],10),-1!==t[0]&&t[1][t[0]+1]){if(Z(p).triggerHandler("jqGridAddEditClickPgButtons",["next",Z(m),t[1][t[0]]]),Z.jgrid.isFunction(Y.onclickPgButtons)&&void
0!==(e=Y.onclickPgButtons.call(p,"next",Z(m),t[1][t[0]]))&&!1===e)return!1;if(Z("#"+Z.jgrid.jqID(t[1][t[0]+1])).hasClass(K.disabled))return!1;z(t[1][t[0]+1],p,m),p.p.multiselect&&$[p.p.id].editselected||Z(p).jqGrid("setSelection",t[1][t[0]+1]),Z(p).triggerHandler("jqGridAddEditAfterClickPgButtons",["next",Z(m),t[1][t[0]]]),Z.jgrid.isFunction(Y.afterclickPgButtons)&&Y.afterclickPgButtons.call(p,"next",Z(m),t[1][t[0]+1]),Q(),W(t[0]+1,t)}}return!1}),Z("#pData",s).click(function(){if(A()){Z(".FormError",m).hide();var
e,t=L();if(-1!==t[0]&&t[1][t[0]-1]){if(Z(p).triggerHandler("jqGridAddEditClickPgButtons",["prev",Z(m),t[1][t[0]]]),Z.jgrid.isFunction(Y.onclickPgButtons)&&void
0!==(e=Y.onclickPgButtons.call(p,"prev",Z(m),t[1][t[0]]))&&!1===e)return!1;if(Z("#"+Z.jgrid.jqID(t[1][t[0]-1])).hasClass(K.disabled))return!1;z(t[1][t[0]-1],p,m),p.p.multiselect&&$[p.p.id].editselected||Z(p).jqGrid("setSelection",t[1][t[0]-1]),Z(p).triggerHandler("jqGridAddEditAfterClickPgButtons",["prev",Z(m),t[1][t[0]]]),Z.jgrid.isFunction(Y.afterclickPgButtons)&&Y.afterclickPgButtons.call(p,"prev",Z(m),t[1][t[0]-1]),Q(),W(t[0]-1,t)}}return!1}),Z(p).triggerHandler("jqGridAddEditAfterShowForm",[Z(m),h]),Z.jgrid.isFunction($[p.p.id].afterShowForm)&&$[p.p.id].afterShowForm.call(p,Z(m),h),L());W(t[0],t)}}function
N(){var
e,t,a={};for(e
in
Z(f).find(".FormElement").each(function(){var
e,t=Z(".customelement",this);if(t.length){var
t=t[0],i=Z(t).attr("name");Z.each(p.p.colModel,function(){if(this.name===i&&this.editoptions&&Z.jgrid.isFunction(this.editoptions.custom_value)){try{if(u[i]=this.editoptions.custom_value.call(p,Z("#"+Z.jgrid.jqID(i),f),"get"),void
0===u[i])throw"e1"}catch(e){"e1"===e?Z.jgrid.info_dialog(v.errcap,"function 'custom_value' "+$[Z(this)[0]].p.msg.novalue,$[Z(this)[0]].p.bClose,{styleUI:$[Z(this)[0]].p.styleUI}):Z.jgrid.info_dialog(v.errcap,e.message,$[Z(this)[0]].p.bClose,{styleUI:$[Z(this)[0]].p.styleUI})}return!0}})}else{switch(Z(this).get(0).type){case"checkbox":Z(this).is(":checked")?u[this.name]=Z(this).val():(e=Z(this).attr("offval"),u[this.name]=e);break;case"select-one":u[this.name]=Z(this).val();break;case"select-multiple":u[this.name]=Z(this).val(),u[this.name]=u[this.name]?u[this.name].join(","):"";break;case"radio":if(a.hasOwnProperty(this.name))return!0;a[this.name]=void
0===Z(this).attr("offval")?"off":Z(this).attr("offval");break;default:u[this.name]=Z(this).val()}p.p.autoencode&&(u[this.name]=Z.jgrid.htmlEncode(u[this.name]))}}),a)a.hasOwnProperty(e)&&(t=Z('input[name="'+e+'"]:checked',f).val(),u[e]=void
0!==t?t:a[e],p.p.autoencode)&&(u[e]=Z.jgrid.htmlEncode(u[e]))}function
z(i,a,d){var
r,o,e,t,n,l,s=0,c=(($[p.p.id].checkOnSubmit||$[p.p.id].checkOnUpdate)&&(p.p.savedData={},p.p.savedData[a.p.id+"_id"]=i),a.p.colModel);"_empty"===i?(Z(c).each(function(){r=this.name,n=Z.extend({},this.editoptions||{}),(e=Z("#"+Z.jgrid.jqID(r),d))&&e.length&&null!==e[0]&&(t="","custom"===this.edittype&&Z.jgrid.isFunction(n.custom_value)?n.custom_value.call(p,Z("#"+r,d),"set",t):n.defaultValue?(t=Z.jgrid.isFunction(n.defaultValue)?n.defaultValue.call(p):n.defaultValue,"checkbox"===e[0].type?(n=t.toLowerCase()).search(/(false|f|0|no|n|off|undefined)/i)<0&&""!==n?(e[0].checked=!0,e[0].defaultChecked=!0,e[0].value=t):(e[0].checked=!1,e[0].defaultChecked=!1):e.val(t)):"checkbox"===e[0].type?(e[0].checked=!1,e[0].defaultChecked=!1,t=Z(e).attr("offval")):e[0].type&&"select"===e[0].type.substr(0,6)?e[0].selectedIndex=0:e.val(t),!0!==$[p.p.id].checkOnSubmit&&!$[p.p.id].checkOnUpdate||(p.p.savedData[r]=t))}),Z("#id_g",d).val(i)):(l=Z(a).jqGrid("getInd",i,!0))&&(Z('td[role="gridcell"]',l).each(function(t){if("cb"!==(r=c[t].name)&&"subgrid"!==r&&"rn"!==r&&!0===c[t].editable&&"sc"!==r){if(r===a.p.ExpandColumn&&!0===a.p.treeGrid)o=Z(this).text();else
try{o=Z.unformat.call(a,Z(this),{rowId:i,colModel:c[t]},t)}catch(e){o="textarea"===c[t].edittype?Z(this).text():Z(this).html()}switch(p.p.autoencode&&(o=Z.jgrid.htmlDecode(o)),!0!==$[p.p.id].checkOnSubmit&&!$[p.p.id].checkOnUpdate||(p.p.savedData[r]=o),r=Z.jgrid.jqID(r),c[t].edittype){case"select":var
e=o.split(","),e=Z.map(e,function(e){return Z.jgrid.trim(e)});Z("#"+r+" option",d).each(function(){!(c[t].editoptions.multiple||Z.jgrid.trim(o)!==Z.jgrid.trim(Z(this).text())&&e[0]!==Z.jgrid.trim(Z(this).text())&&e[0]!==Z.jgrid.trim(Z(this).val()))||c[t].editoptions.multiple&&(-1<Z.inArray(Z.jgrid.trim(Z(this).text()),e)||-1<Z.inArray(Z.jgrid.trim(Z(this).val()),e))?this.selected=!0:this.selected=!1}),!0!==$[p.p.id].checkOnSubmit&&!$[p.p.id].checkOnUpdate||(o=Z("#"+r,d).val(),c[t].editoptions.multiple&&(o=o.join(",")),p.p.savedData[r]=o);break;case"checkbox":o=String(o),c[t].editoptions&&c[t].editoptions.value?c[t].editoptions.value.split(":")[0]===o?Z("#"+r,d)[p.p.useProp?"prop":"attr"]({checked:!0,defaultChecked:!0}):Z("#"+r,d)[p.p.useProp?"prop":"attr"]({checked:!1,defaultChecked:!1}):(o=o.toLowerCase()).search(/(false|f|0|no|n|off|undefined)/i)<0&&""!==o?(Z("#"+r,d)[p.p.useProp?"prop":"attr"]("checked",!0),Z("#"+r,d)[p.p.useProp?"prop":"attr"]("defaultChecked",!0)):(Z("#"+r,d)[p.p.useProp?"prop":"attr"]("checked",!1),Z("#"+r,d)[p.p.useProp?"prop":"attr"]("defaultChecked",!1)),!0!==$[p.p.id].checkOnSubmit&&!$[p.p.id].checkOnUpdate||(o=Z("#"+r,d).is(":checked")?Z("#"+r,d).val():Z("#"+r,d).attr("offval"),p.p.savedData[r]=o);break;case"custom":try{if(!c[t].editoptions||!Z.jgrid.isFunction(c[t].editoptions.custom_value))throw"e1";c[t].editoptions.custom_value.call(p,Z("#"+r,d),"set",o)}catch(e){"e1"===e?Z.jgrid.info_dialog(v.errcap,"function 'custom_value' "+$[Z(this)[0]].p.msg.nodefined,Z.rp_ge[Z(this)[0]].p.bClose,{styleUI:$[Z(this)[0]].p.styleUI}):Z.jgrid.info_dialog(v.errcap,e.message,Z.rp_ge[Z(this)[0]].p.bClose,{styleUI:$[Z(this)[0]].p.styleUI})}break;default:("&nbsp;"===o||"&#160;"===o||1===o.length&&160===o.charCodeAt(0))&&(o=""),Z("#"+r,d).val(o)}s++}}),0<s)&&(Z("#id_g",f).val(i),!0!==$[p.p.id].checkOnSubmit&&!$[p.p.id].checkOnUpdate||(p.p.savedData[a.p.id+"_id"]=i))}function
H(){var
a,d,r,e,t,o,i,n=[!0,"",""],l={},s=p.p.prmNames,c=Z(p).triggerHandler("jqGridAddEditBeforeCheckValues",[u,Z(m),h]);if(c&&"object"==typeof
c&&(u=c),Z.jgrid.isFunction($[p.p.id].beforeCheckValues)&&(c=$[p.p.id].beforeCheckValues.call(p,u,Z(m),h))&&"object"==typeof
c&&(u=c),!$[p.p.id].html5Check||Z.jgrid.validateForm(b[0])){for(e
in
u)if(u.hasOwnProperty(e)&&!1===(n=Z.jgrid.checkValues.call(p,u[e],e))[0])break;if(Z.each(p.p.colModel,function(e,t){t.editoptions&&!0===t.editoptions.NullIfEmpty&&u.hasOwnProperty(t.name)&&""===u[t.name]&&(u[t.name]="null")}),(n=n[0]&&(void
0===(l=Z(p).triggerHandler("jqGridAddEditClickSubmit",[$[p.p.id],u,h]))&&Z.jgrid.isFunction($[p.p.id].onclickSubmit)&&(l=$[p.p.id].onclickSubmit.call(p,$[p.p.id],u,h)||{}),(n=void
0===(n=Z(p).triggerHandler("jqGridAddEditBeforeSubmit",[u,Z(m),h]))?[!0,"",""]:n)[0])&&Z.jgrid.isFunction($[p.p.id].beforeSubmit)?$[p.p.id].beforeSubmit.call(p,u,Z(m),h):n)[0]&&!$[p.p.id].processing){if($[p.p.id].processing=!0,Z("#sData",f+"_2").addClass(K.active),c=$[p.p.id].url||Z(p).jqGrid("getGridParam","editurl"),r=s.oper,d="clientArray"===c?p.p.keyName:s.id,u[r]="_empty"===Z.jgrid.trim(u[p.p.id+"_id"])?s.addoper:s.editoper,(u[r]!==s.addoper||void
0===u[d])&&(u[d]=u[p.p.id+"_id"]),delete
u[p.p.id+"_id"],u=Z.extend(u,$[p.p.id].editData,l),!0===p.p.treeGrid)for(t
in
u[r]===s.addoper&&(o=Z(p).jqGrid("getGridParam","selrow"),l="adjacency"===p.p.treeGridModel?p.p.treeReader.parent_id_field:"parent_id",u[l]=o),p.p.treeReader)p.p.treeReader.hasOwnProperty(t)&&(i=p.p.treeReader[t],!u.hasOwnProperty(i)||u[r]===s.addoper&&"parent_id_field"===t||delete
u[i]);u[d]=Z.jgrid.stripPref(p.p.idPrefix,u[d]);l=Z.extend({url:c,type:$[p.p.id].mtype,data:Z.jgrid.isFunction($[p.p.id].serializeEditData)?$[p.p.id].serializeEditData.call(p,u):u,complete:function(e,t){if(Z("#sData",f+"_2").removeClass(K.active),u[d]=p.p.idPrefix+u[d],300<=e.status&&304!==e.status?(n[0]=!1,n[1]=Z(p).triggerHandler("jqGridAddEditErrorTextFormat",[e,h]),Z.jgrid.isFunction($[p.p.id].errorTextFormat)?n[1]=$[p.p.id].errorTextFormat.call(p,e,h):n[1]=t+" Status: '"+e.statusText+"'. Error code: "+e.status):(n=void
0===(n=Z(p).triggerHandler("jqGridAddEditAfterSubmit",[e,u,h]))?[!0,"",""]:n)[0]&&Z.jgrid.isFunction($[p.p.id].afterSubmit)&&(n=$[p.p.id].afterSubmit.call(p,e,u,h)),!1===n[0])Z(".FormError",m).html(n[1]),Z(".FormError",m).show();else
if(p.p.autoencode&&Z.each(u,function(e,t){u[e]=Z.jgrid.htmlDecode(t)}),u[r]===s.addoper?(n[2]||(n[2]=Z.jgrid.randId()),null==u[d]||u[d]===p.p.idPrefix+"_empty"||""===u[d]?u[d]=n[2]:n[2]=u[d],$[p.p.id].reloadAfterSubmit?Z(p).trigger("reloadGrid"):!0===p.p.treeGrid?Z(p).jqGrid("addChildNode",n[2],o,u):Z(p).jqGrid("addRowData",n[2],u,Y.addedrow),$[p.p.id].closeAfterAdd?(!0!==p.p.treeGrid&&Z(p).jqGrid("setSelection",n[2]),Z.jgrid.hideModal("#"+Z.jgrid.jqID(j.themodal),{gb:"#gbox_"+Z.jgrid.jqID(g),jqm:Y.jqModal,onClose:$[p.p.id].onClose,removemodal:$[p.p.id].removemodal,formprop:!$[p.p.id].recreateForm,form:$[p.p.id].form})):$[p.p.id].clearAfterAdd&&z("_empty",p,m)):($[p.p.id].reloadAfterSubmit?(Z(p).trigger("reloadGrid"),$[p.p.id].closeAfterEdit||setTimeout(function(){Z(p).jqGrid("setSelection",u[d])},1e3)):!0===p.p.treeGrid?Z(p).jqGrid("setTreeRow",u[d],u):Z(p).jqGrid("setRowData",u[d],u),$[p.p.id].closeAfterEdit&&Z.jgrid.hideModal("#"+Z.jgrid.jqID(j.themodal),{gb:"#gbox_"+Z.jgrid.jqID(g),jqm:Y.jqModal,onClose:$[p.p.id].onClose,removemodal:$[p.p.id].removemodal,formprop:!$[p.p.id].recreateForm,form:$[p.p.id].form})),(Z.jgrid.isFunction($[p.p.id].afterComplete)||Object.prototype.hasOwnProperty.call(Z._data(Z(p)[0],"events"),"jqGridAddEditAfterComplete"))&&(a=e,setTimeout(function(){Z(p).triggerHandler("jqGridAddEditAfterComplete",[a,u,Z(m),h]);try{$[p.p.id].afterComplete.call(p,a,u,Z(m),h)}catch(e){}a=null},500)),($[p.p.id].checkOnSubmit||$[p.p.id].checkOnUpdate)&&(Z(m).data("disabled",!1),"_empty"!==p.p.savedData[p.p.id+"_id"]))for(var
i
in
p.p.savedData)p.p.savedData.hasOwnProperty(i)&&u[i]&&(p.p.savedData[i]=u[i]);$[p.p.id].processing=!1;try{Z(":input:visible",m)[0].focus()}catch(e){}}},Z.jgrid.ajaxOptions,$[p.p.id].ajaxEditOptions);l.url||$[p.p.id].useDataProxy||(Z.jgrid.isFunction(p.p.dataProxy)?$[p.p.id].useDataProxy=!0:(n[0]=!1,n[1]+=" "+v.nourl)),n[0]&&($[p.p.id].useDataProxy?!1===(c=void
0===(c=p.p.dataProxy.call(p,l,"set_"+p.p.id))?[!0,""]:c)[0]?(n[0]=!1,n[1]=c[1]||"Error deleting the selected row!"):(l.data.oper===s.addoper&&$[p.p.id].closeAfterAdd&&Z.jgrid.hideModal("#"+Z.jgrid.jqID(j.themodal),{gb:"#gbox_"+Z.jgrid.jqID(g),jqm:Y.jqModal,onClose:$[p.p.id].onClose,removemodal:$[p.p.id].removemodal,formprop:!$[p.p.id].recreateForm,form:$[p.p.id].form}),l.data.oper===s.editoper&&$[p.p.id].closeAfterEdit&&Z.jgrid.hideModal("#"+Z.jgrid.jqID(j.themodal),{gb:"#gbox_"+Z.jgrid.jqID(g),jqm:Y.jqModal,onClose:$[p.p.id].onClose,removemodal:$[p.p.id].removemodal,formprop:!$[p.p.id].recreateForm,form:$[p.p.id].form})):"clientArray"===l.url?($[p.p.id].reloadAfterSubmit=!1,u=l.data,l.complete({status:200,statusText:""},"")):Z.ajax(l))}!1===n[0]&&(Z(m).scrollTop(0),Z(".FormError",m).html(n[1]),Z(".FormError",m).show())}}function
V(e,t){var
i,a=!1;if(!(a=!(Z.isPlainObject(e)&&Z.isPlainObject(t)&&Object.getOwnPropertyNames(e).length===Object.getOwnPropertyNames(t).length)))for(i
in
t)if(t.hasOwnProperty(i)){if(!e.hasOwnProperty(i)){a=!0;break}if(e[i]!==t[i]){a=!0;break}}return a}function
A(){var
e=!0;return Z(".FormError",m).hide(),$[p.p.id].checkOnUpdate&&(u={},N(),V(u,p.p.savedData))&&(Z(m).data("disabled",!0),Z(".confirm","#"+j.themodal).show(),e=!1),e}function
W(e,t){var
i=t[1].length-1;0===e||void
0!==t[1][e-1]&&Z("#"+Z.jgrid.jqID(t[1][e-1])).hasClass(K.disabled)?Z("#pData",s).addClass(K.disabled):Z("#pData",s).removeClass(K.disabled),e===i||void
0!==t[1][e+1]&&Z("#"+Z.jgrid.jqID(t[1][e+1])).hasClass(K.disabled)?Z("#nData",s).addClass(K.disabled):Z("#nData",s).removeClass(K.disabled)}function
L(){var
e=Z(p).jqGrid("getDataIDs"),t=Z("#id_g",f).val();if(p.p.multiselect&&$[p.p.id].editselected){for(var
i=[],a=0,d=e.length;a<d;a++)-1!==Z.inArray(e[a],p.p.selarrrow)&&i.push(e[a]);return[Z.inArray(t,i),i]}return[Z.inArray(t,e),e]}function
Q(){if($[p.p.id].checkOnSubmit||$[p.p.id].checkOnUpdate){var
e,t,i=[],a={},i=Z.map(p.p.savedData,function(e,t){return t});for(e
in
Z(".FormElement",b).each(function(){if(""!==Z.jgrid.trim(this.name)&&-1===i.indexOf(this.name)){var
e=Z(this).val(),t=Z(this).get(0).type;if("checkbox"===t)Z(this).is(":checked")||(e=Z(this).attr("offval"));else
if("select-multiple"===t)e=e.join(",");else
if("radio"===t){if(a.hasOwnProperty(this.name))return!0;a[this.name]=void
0===Z(this).attr("offval")?"off":Z(this).attr("offval")}p.p.savedData[this.name]=e}}),a)a.hasOwnProperty(e)&&(t=Z('input[name="'+e+'"]:checked',b).val(),p.p.savedData[e]=void
0!==t?t:a[e])}}})},viewGridRow:function(R,U){var
e=Z.jgrid.getRegional(this[0],"view"),t=this[0].p.styleUI,T=Z.jgrid.styleUI[t].formedit,N=Z.jgrid.styleUI[t].common;return U=Z.extend(!0,{top:0,left:0,width:500,datawidth:"auto",height:"auto",dataheight:"auto",modal:!1,overlay:30,drag:!0,resize:!0,jqModal:!0,closeOnEscape:!1,labelswidth:"auto",closeicon:[],navkeys:[!1,38,40],onClose:null,beforeShowForm:null,beforeInitData:null,viewPagerButtons:!0,recreateForm:!1,removemodal:!0,form:"view",buttons:[]},e,U||{}),$[Z(this)[0].p.id]=U,this.each(function(){var
r=this;if(r.grid&&R){var
a=r.p.id,d="ViewGrid_"+Z.jgrid.jqID(a),n="ViewTbl_"+Z.jgrid.jqID(a),i="ViewGrid_"+a,e="ViewTbl_"+a,t={themodal:"viewmod"+a,modalhead:"viewhd"+a,modalcontent:"viewcnt"+a,scrollelm:d},o=!0,l=1,s=0,c=($[r.p.id].styleUI=r.p.styleUI||"jQueryUI",U.recreateForm||Z(r).data("viewProp")&&Z.extend($[Z(this)[0].p.id],Z(r).data("viewProp")),isNaN($[Z(this)[0].p.id].dataheight)?$[Z(this)[0].p.id].dataheight:$[Z(this)[0].p.id].dataheight+"px"),p=isNaN($[Z(this)[0].p.id].datawidth)?$[Z(this)[0].p.id].datawidth:$[Z(this)[0].p.id].datawidth+"px",p=Z("<form name='FormPost' id='"+i+"' class='FormGrid' style='width:"+p+";height:"+c+";'></form>"),u=Z("<table id='"+e+"' class='EditTable ViewTable'><tbody></tbody></table>");if(Z(r.p.colModel).each(function(){var
e=this.formoptions;l=Math.max(l,e&&e.colpos||0),s=Math.max(s,e&&e.rowpos||0)}),Z(p).append(u),!1!==(o=(o=void
0===(o=Z(r).triggerHandler("jqGridViewRowBeforeInitData",[p]))?!0:o)&&Z.jgrid.isFunction($[r.p.id].beforeInitData)?$[r.p.id].beforeInitData.call(r,p):o)){for(var
h,g,m,f,j,v,b,w,c=R,D=r,y=u,q=l,x=0,_="<td class='CaptionTD form-view-label "+N.content+"' width='"+U.labelswidth+"'></td><td class='DataTD form-view-data ui-helper-reset "+N.content+"'></td>",I="",M="<td class='CaptionTD form-view-label "+N.content+"'></td><td class='DataTD form-view-data "+N.content+"'></td>",B=["integer","number","currency"],k=0,C=0,F=1;F<=q;F++)I+=1===F?_:M;Z(D.p.colModel).each(function(){(g=(!this.editrules||!0!==this.editrules.edithidden)&&!0===this.hidden)||"right"!==this.align||(this.formatter&&-1!==Z.inArray(this.formatter,B)?k=Math.max(k,parseInt(this.width,10)):C=Math.max(C,parseInt(this.width,10)))}),v=0!==k?k:0!==C?C:0,j=Z(D).jqGrid("getInd",c),Z(D.p.colModel).each(function(e){var
t,i,a,d;h=this.name,g=(!this.editrules||!0!==this.editrules.edithidden)&&!0===this.hidden,f=g?"style='display:none'":"",w="boolean"!=typeof
this.viewable||this.viewable,"cb"!==h&&"subgrid"!==h&&"rn"!==h&&w&&"sc"!==h&&(w=!1===j?"":h===D.p.ExpandColumn&&!0===D.p.treeGrid?Z("td",D.rows[j]).eq(e).text():Z("td",D.rows[j]).eq(e).html(),b="right"===this.align&&0!==v,t=Z.extend({},{rowabove:!1,rowcontent:""},this.formoptions||{}),i=parseInt(t.rowpos,10)||x+1,a=parseInt(2*(parseInt(t.colpos,10)||1),10),t.rowabove&&(d=Z("<tr><td class='contentinfo' colspan='"+2*q+"'>"+t.rowcontent+"</td></tr>"),Z(y).append(d),d[0].rp=i),0===(m=Z(y).find("tr[rowpos="+i+"]")).length&&(m=Z("<tr "+f+" rowpos='"+i+"'></tr>").addClass("FormData").attr("id","trv_"+h),Z(m).append(I),Z(y).append(m),m[0].rp=i),Z("td",m[0]).eq(a-2).html("<b>"+(void
0===t.label?D.p.colNames[e]:t.label)+"</b>"),Z("td",m[0]).eq(a-1).append("<span>"+w+"</span>").attr("id","v_"+h),b&&Z("td",m[0]).eq(a-1).find("span").css({"text-align":"right",width:v+"px"}),x,x++)}),0<x&&((c=Z("<tr class='FormData' style='display:none'><td class='CaptionTD'></td><td colspan='"+(2*q-1)+"' class='DataTD'><input class='FormElement' id='id_g' type='text' name='id' value='"+c+"'/></td></tr>"))[0].rp=x+99,Z(y).append(c));var
G,e="rtl"===r.p.direction,o="<a id='"+(e?"nData":"pData")+"' class='fm-button "+N.button+"'><span class='"+N.icon_base+" "+T.icon_prev+"'></span></a>",c="<a id='"+(e?"pData":"nData")+"' class='fm-button "+N.button+"'><span class='"+N.icon_base+" "+T.icon_next+"'></span></a>",O="<a id='cData' class='fm-button "+N.button+"'>"+U.bClose+"</a>",O=Array.isArray($[r.p.id].buttons)?Z.jgrid.buildButtons($[r.p.id].buttons,O,N):O,p=(0<s&&(G=[],Z.each(Z(u)[0].rows,function(e,t){G[e]=t}),G.sort(function(e,t){return e.rp>t.rp?1:e.rp<t.rp?-1:0}),Z.each(G,function(e,t){Z("tbody",u).append(t)})),U.gbox="#gbox_"+Z.jgrid.jqID(a),Z("<div></div>").append(p).append("<table border='0' class='EditTable' id='"+n+"_2'><tbody><tr id='Act_Buttons'><td class='navButton' width='"+U.labelswidth+"'>"+(e?c+o:o+c)+"</td><td class='EditButton'>"+O+"</td></tr></tbody></table>")),o=Z(".ui-jqgrid").css("font-size")||"11px",c=(Z.jgrid.createModal(t,p,$[Z(this)[0].p.id],"#gview_"+Z.jgrid.jqID(r.p.id),Z("#gview_"+Z.jgrid.jqID(r.p.id))[0],null,{"font-size":o}),e&&(Z("#pData, #nData","#"+n+"_2").css("float","right"),Z(".EditButton","#"+n+"_2").css("text-align","left")),U.viewPagerButtons||Z("#pData, #nData","#"+n+"_2").hide(),Z("#"+t.themodal).keydown(function(e){return 27===e.which?($[r.p.id].closeOnEscape&&Z.jgrid.hideModal("#"+Z.jgrid.jqID(t.themodal),{gb:U.gbox,jqm:U.jqModal,onClose:U.onClose,removemodal:$[r.p.id].removemodal,formprop:!$[r.p.id].recreateForm,form:$[r.p.id].form}),!1):!0===U.navkeys[0]?e.which===U.navkeys[1]?(Z("#pData","#"+n+"_2").trigger("click"),!1):e.which===U.navkeys[2]?(Z("#nData","#"+n+"_2").trigger("click"),!1):void
0:void
0}),U.closeicon=Z.extend([!0,"left",T.icon_close],U.closeicon),!0===U.closeicon[0]&&Z("#cData","#"+n+"_2").addClass("right"===U.closeicon[1]?"fm-button-icon-right":"fm-button-icon-left").append("<span class='"+N.icon_base+" "+U.closeicon[2]+"'></span>"),Z(r).triggerHandler("jqGridViewRowBeforeShowForm",[Z("#"+d)]),Z.jgrid.isFunction(U.beforeShowForm)&&U.beforeShowForm.call(r,Z("#"+d)),Z.jgrid.viewModal("#"+Z.jgrid.jqID(t.themodal),{gbox:"#gbox_"+Z.jgrid.jqID(a),jqm:U.jqModal,overlay:U.overlay,modal:U.modal,onHide:function(e){var
t="rtl"===Z("#gbox_"+Z.jgrid.jqID(a)).attr("dir"),i=parseFloat(Z("#viewmod"+a)[0].style.width);Z(r).data("viewProp",{top:parseFloat(Z(e.w).css("top")),left:t?Z("#gbox_"+Z.jgrid.jqID(a)).outerWidth()-i-parseFloat(Z(e.w).css("left"))+12:parseFloat(Z(e.w).css("left")),width:Z(e.w).width(),height:Z(e.w).height(),dataheight:Z("#"+d).height(),datawidth:Z("#"+d).width()}),e.w.remove(),e.o&&e.o.remove()}}),Z(".fm-button:not(."+N.disabled+")","#"+n+"_2").hover(function(){Z(this).addClass(N.hover)},function(){Z(this).removeClass(N.hover)}),P(),Z("#cData","#"+n+"_2").click(function(){return Z.jgrid.hideModal("#"+Z.jgrid.jqID(t.themodal),{gb:"#gbox_"+Z.jgrid.jqID(a),jqm:U.jqModal,onClose:U.onClose,removemodal:$[r.p.id].removemodal,formprop:!$[r.p.id].recreateForm,form:$[r.p.id].form}),!1}),Z("#"+n+"_2").find("[data-index]").each(function(){var
t=parseInt(Z(this).attr("data-index"),10);0<=t&&U.buttons[t].hasOwnProperty("click")&&Z(this).on("click",function(e){U.buttons[t].click.call(r,Z("#"+i)[0],$[r.p.id],e)})}),Z("#nData","#"+n+"_2").click(function(){Z("#FormError","#"+n).hide();var
e=A();return e[0]=parseInt(e[0],10),-1!==e[0]&&e[1][e[0]+1]&&(Z(r).triggerHandler("jqGridViewRowClickPgButtons",["next",Z("#"+d),e[1][e[0]]]),Z.jgrid.isFunction(U.onclickPgButtons)&&U.onclickPgButtons.call(r,"next",Z("#"+d),e[1][e[0]]),S(e[1][e[0]+1],r),r.p.multiselect&&$[r.p.id].viewselected||Z(r).jqGrid("setSelection",e[1][e[0]+1]),Z(r).triggerHandler("jqGridViewRowAfterClickPgButtons",["next",Z("#"+d),e[1][e[0]+1]]),Z.jgrid.isFunction(U.afterclickPgButtons)&&U.afterclickPgButtons.call(r,"next",Z("#"+d),e[1][e[0]+1]),E(e[0]+1,e)),P(),!1}),Z("#pData","#"+n+"_2").click(function(){Z("#FormError","#"+n).hide();var
e=A();return-1!==e[0]&&e[1][e[0]-1]&&(Z(r).triggerHandler("jqGridViewRowClickPgButtons",["prev",Z("#"+d),e[1][e[0]]]),Z.jgrid.isFunction(U.onclickPgButtons)&&U.onclickPgButtons.call(r,"prev",Z("#"+d),e[1][e[0]]),S(e[1][e[0]-1],r),r.p.multiselect&&$[r.p.id].viewselected||Z(r).jqGrid("setSelection",e[1][e[0]-1]),Z(r).triggerHandler("jqGridViewRowAfterClickPgButtons",["prev",Z("#"+d),e[1][e[0]-1]]),Z.jgrid.isFunction(U.afterclickPgButtons)&&U.afterclickPgButtons.call(r,"prev",Z("#"+d),e[1][e[0]-1]),E(e[0]-1,e)),P(),!1}),A());E(c[0],c)}}function
P(){!0!==$[r.p.id].closeOnEscape&&!0!==$[r.p.id].navkeys[0]||setTimeout(function(){Z(".ui-jqdialog-titlebar-close","#"+Z.jgrid.jqID(t.modalhead)).attr("tabindex","-1").focus()},0)}function
S(e,t){var
i,a,d,r=0,o=Z(t).jqGrid("getInd",e,!0);o&&(Z("td",o).each(function(e){i=t.p.colModel[e].name,a=(!t.p.colModel[e].editrules||!0!==t.p.colModel[e].editrules.edithidden)&&!0===t.p.colModel[e].hidden,"cb"!==i&&"subgrid"!==i&&"rn"!==i&&"sc"!==i&&(d=i===t.p.ExpandColumn&&!0===t.p.treeGrid?Z(this).text():Z(this).html(),i=Z.jgrid.jqID("v_"+i),Z("#"+i+" span","#"+n).html(d),a&&Z("#"+i,"#"+n).parents("tr").first().hide(),r++)}),0<r)&&Z("#id_g","#"+n).val(e)}function
E(e,t){var
i=t[1].length-1;0===e?Z("#pData","#"+n+"_2").addClass(N.disabled):void
0!==t[1][e-1]&&Z("#"+Z.jgrid.jqID(t[1][e-1])).hasClass(N.disabled)?Z("#pData",n+"_2").addClass(N.disabled):Z("#pData","#"+n+"_2").removeClass(N.disabled),e===i?Z("#nData","#"+n+"_2").addClass(N.disabled):void
0!==t[1][e+1]&&Z("#"+Z.jgrid.jqID(t[1][e+1])).hasClass(N.disabled)?Z("#nData",n+"_2").addClass(N.disabled):Z("#nData","#"+n+"_2").removeClass(N.disabled)}function
A(){var
e=Z(r).jqGrid("getDataIDs"),t=Z("#id_g","#"+n).val();if(r.p.multiselect&&$[r.p.id].viewselected){for(var
i=[],a=0,d=e.length;a<d;a++)-1!==Z.inArray(e[a],r.p.selarrrow)&&i.push(e[a]);return[Z.inArray(t,i),i]}return[Z.inArray(t,e),e]}})},delGridRow:function(h,g){var
e=Z.jgrid.getRegional(this[0],"del"),t=this[0].p.styleUI,m=Z.jgrid.styleUI[t].formedit,f=Z.jgrid.styleUI[t].common;return g=Z.extend(!0,{top:0,left:0,width:240,height:"auto",dataheight:"auto",modal:!1,overlay:30,drag:!0,resize:!0,url:"",mtype:"POST",reloadAfterSubmit:!0,beforeShowForm:null,beforeInitData:null,afterShowForm:null,beforeSubmit:null,onclickSubmit:null,afterSubmit:null,jqModal:!0,closeOnEscape:!1,delData:{},delicon:[],cancelicon:[],onClose:null,ajaxDelOptions:{},processing:!1,serializeDelData:null,useDataProxy:!1},e,g||{}),$[Z(this)[0].p.id]=g,this.each(function(){var
o=this;if(o.grid&&h){var
n,a,l,s=o.p.id,c={},e=!0,p="DelTbl_"+Z.jgrid.jqID(s),i="DelTbl_"+s,u={themodal:"delmod"+s,modalhead:"delhd"+s,modalcontent:"delcnt"+s,scrollelm:p};if($[o.p.id].styleUI=o.p.styleUI||"jQueryUI",Array.isArray(h)&&(h=h.join()),void
0!==Z("#"+Z.jgrid.jqID(u.themodal))[0]){if(!1===(e=(e=void
0===(e=Z(o).triggerHandler("jqGridDelRowBeforeInitData",[Z("#"+p)]))?!0:e)&&Z.jgrid.isFunction($[o.p.id].beforeInitData)?$[o.p.id].beforeInitData.call(o,Z("#"+p)):e))return;Z("#DelData>td","#"+p).text(h),Z("#DelError","#"+p).hide(),!0===$[o.p.id].processing&&($[o.p.id].processing=!1,Z("#dData","#"+p).removeClass(f.active))}else{var
t=isNaN($[o.p.id].dataheight)?$[o.p.id].dataheight:$[o.p.id].dataheight+"px",d=isNaN(g.datawidth)?g.datawidth:g.datawidth+"px",d="<div id='"+i+"' class='formdata' style='width:"+d+";overflow:auto;position:relative;height:"+t+";'>",t=(d=(d=(d=d+"<table class='DelTable'><tbody>"+("<tr id='DelError' style='display:none'><td class='"+f.error+"'></td></tr>"))+("<tr id='DelData' style='display:none'><td >"+h+"</td></tr>"))+('<tr><td class="delmsg" style="white-space:pre;">'+$[o.p.id].msg+"</td></tr><tr><td >&#160;</td></tr>")+"</tbody></table></div>","<a id='dData' class='fm-button "+f.button+"'>"+g.bSubmit+"</a>"),r="<a id='eData' class='fm-button "+f.button+"'>"+g.bCancel+"</a>",t=Array.isArray($[o.p.id].buttons)?Z.jgrid.buildButtons($[o.p.id].buttons,t+r,f):t+r,r=Z(".ui-jqgrid").css("font-size")||"11px";if(d+="<table class='EditTable ui-common-table' id='"+p+"_2'><tbody><tr><td><hr class='"+f.content+"' style='margin:1px'/></td></tr><tr><td class='DelButton EditButton'>"+t+"</td></tr></tbody></table>",g.gbox="#gbox_"+Z.jgrid.jqID(s),Z.jgrid.createModal(u,d,$[o.p.id],"#gview_"+Z.jgrid.jqID(o.p.id),Z("#gview_"+Z.jgrid.jqID(o.p.id))[0],null,{"font-size":r}),Z(".fm-button","#"+p+"_2").hover(function(){Z(this).addClass(f.hover)},function(){Z(this).removeClass(f.hover)}),g.delicon=Z.extend([!0,"left",m.icon_del],$[o.p.id].delicon),g.cancelicon=Z.extend([!0,"left",m.icon_cancel],$[o.p.id].cancelicon),!0===g.delicon[0]&&Z("#dData","#"+p+"_2").addClass("right"===g.delicon[1]?"fm-button-icon-right":"fm-button-icon-left").append("<span class='"+f.icon_base+" "+g.delicon[2]+"'></span>"),!0===g.cancelicon[0]&&Z("#eData","#"+p+"_2").addClass("right"===g.cancelicon[1]?"fm-button-icon-right":"fm-button-icon-left").append("<span class='"+f.icon_base+" "+g.cancelicon[2]+"'></span>"),Z("#dData","#"+p+"_2").click(function(){var
e,d=[!0,""],r=Z("#DelData>td","#"+p).text();if(c={},void
0===(c=Z(o).triggerHandler("jqGridDelRowClickSubmit",[$[o.p.id],r]))&&Z.jgrid.isFunction($[o.p.id].onclickSubmit)&&(c=$[o.p.id].onclickSubmit.call(o,$[o.p.id],r)||{}),(d=(d=void
0===(d=Z(o).triggerHandler("jqGridDelRowBeforeSubmit",[r]))?[!0,"",""]:d)[0]&&Z.jgrid.isFunction($[o.p.id].beforeSubmit)?$[o.p.id].beforeSubmit.call(o,r):d)[0]&&!$[o.p.id].processing){if($[o.p.id].processing=!0,a=o.p.prmNames,n=Z.extend({},$[o.p.id].delData,c),l=a.oper,n[l]=a.deloper,l=a.id,!(r=String(r).split(",")).length)return!1;for(e
in
r)r.hasOwnProperty(e)&&(r[e]=Z.jgrid.stripPref(o.p.idPrefix,r[e]));n[l]=r.join(),Z(this).addClass(f.active);var
t,i=Z.extend({url:$[o.p.id].url||Z(o).jqGrid("getGridParam","editurl"),type:$[o.p.id].mtype,data:Z.jgrid.isFunction($[o.p.id].serializeDelData)?$[o.p.id].serializeDelData.call(o,n):n,complete:function(e,t){var
i,a;if(Z("#dData","#"+p+"_2").removeClass(f.active),300<=e.status&&304!==e.status?(d[0]=!1,d[1]=Z(o).triggerHandler("jqGridDelRowErrorTextFormat",[e]),Z.jgrid.isFunction($[o.p.id].errorTextFormat)&&(d[1]=$[o.p.id].errorTextFormat.call(o,e)),void
0===d[1]&&(d[1]=t+" Status: '"+e.statusText+"'. Error code: "+e.status)):(d=void
0===(d=Z(o).triggerHandler("jqGridDelRowAfterSubmit",[e,n]))?[!0,"",""]:d)[0]&&Z.jgrid.isFunction($[o.p.id].afterSubmit)&&(d=$[o.p.id].afterSubmit.call(o,e,n)),!1===d[0])Z("#DelError>td","#"+p).html(d[1]),Z("#DelError","#"+p).show();else{if($[o.p.id].reloadAfterSubmit&&"local"!==o.p.datatype)Z(o).trigger("reloadGrid");else{if(!0===o.p.treeGrid)try{Z(o).jqGrid("delTreeNode",o.p.idPrefix+r[0])}catch(e){}else
for(i=0;i<r.length;i++)Z(o).jqGrid("delRowData",o.p.idPrefix+r[i]);o.p.selrow=null,o.p.selarrrow=[]}(Z.jgrid.isFunction($[o.p.id].afterComplete)||Object.prototype.hasOwnProperty.call(Z._data(Z(o)[0],"events"),"jqGridDelRowAfterComplete"))&&(a=e,setTimeout(function(){Z(o).triggerHandler("jqGridDelRowAfterComplete",[a,n]);try{$[o.p.id].afterComplete.call(o,a,n)}catch(e){}},500))}$[o.p.id].processing=!1,d[0]&&Z.jgrid.hideModal("#"+Z.jgrid.jqID(u.themodal),{gb:"#gbox_"+Z.jgrid.jqID(s),jqm:g.jqModal,onClose:$[o.p.id].onClose})}},Z.jgrid.ajaxOptions,$[o.p.id].ajaxDelOptions);i.url||$[o.p.id].useDataProxy||(Z.jgrid.isFunction(o.p.dataProxy)?$[o.p.id].useDataProxy=!0:(d[0]=!1,d[1]+=" "+Z.jgrid.getRegional(o,"errors.nourl"))),d[0]&&($[o.p.id].useDataProxy?!1===(t=void
0===(t=o.p.dataProxy.call(o,i,"del_"+o.p.id))?[!0,""]:t)[0]?(d[0]=!1,d[1]=t[1]||"Error deleting the selected row!"):Z.jgrid.hideModal("#"+Z.jgrid.jqID(u.themodal),{gb:"#gbox_"+Z.jgrid.jqID(s),jqm:g.jqModal,onClose:$[o.p.id].onClose}):"clientArray"===i.url?(n=i.data,i.complete({status:200,statusText:""},"")):Z.ajax(i))}return!1===d[0]&&(Z("#DelError>td","#"+p).html(d[1]),Z("#DelError","#"+p).show()),!1}),Z("#eData","#"+p+"_2").click(function(){return Z.jgrid.hideModal("#"+Z.jgrid.jqID(u.themodal),{gb:"#gbox_"+Z.jgrid.jqID(s),jqm:$[o.p.id].jqModal,onClose:$[o.p.id].onClose}),!1}),Z("#"+p+"_2").find("[data-index]").each(function(){var
t=parseInt(Z(this).attr("data-index"),10);0<=t&&g.buttons[t].hasOwnProperty("click")&&Z(this).on("click",function(e){g.buttons[t].click.call(o,Z("#"+i)[0],$[o.p.id],e)})}),!1===(e=(e=void
0===(e=Z(o).triggerHandler("jqGridDelRowBeforeInitData",[Z("#"+p)]))?!0:e)&&Z.jgrid.isFunction($[o.p.id].beforeInitData)?$[o.p.id].beforeInitData.call(o,Z("#"+p)):e))return}Z(o).triggerHandler("jqGridDelRowBeforeShowForm",[Z("#"+p)]),Z.jgrid.isFunction($[o.p.id].beforeShowForm)&&$[o.p.id].beforeShowForm.call(o,Z("#"+p)),Z.jgrid.viewModal("#"+Z.jgrid.jqID(u.themodal),{gbox:"#gbox_"+Z.jgrid.jqID(s),jqm:$[o.p.id].jqModal,overlay:$[o.p.id].overlay,modal:$[o.p.id].modal}),Z(o).triggerHandler("jqGridDelRowAfterShowForm",[Z("#"+p)]),Z.jgrid.isFunction($[o.p.id].afterShowForm)&&$[o.p.id].afterShowForm.call(o,Z("#"+p)),!0===$[o.p.id].closeOnEscape&&setTimeout(function(){Z(".ui-jqdialog-titlebar-close","#"+Z.jgrid.jqID(u.modalhead)).attr("tabindex","-1").focus()},0)}})},navGrid:function(g,m,f,j,v,b,w){var
D=Z.jgrid.getRegional(this[0],"nav"),y=this[0].p.styleUI,e=Z.jgrid.styleUI[y].navigator,q=Z.jgrid.styleUI[y].common;return m=Z.extend({edit:!0,editicon:e.icon_edit_nav,add:!0,addicon:e.icon_add_nav,del:!0,delicon:e.icon_del_nav,search:!0,searchicon:e.icon_search_nav,refresh:!0,refreshicon:e.icon_refresh_nav,refreshstate:"firstpage",view:!1,viewicon:e.icon_view_nav,position:"left",closeOnEscape:!0,beforeRefresh:null,afterRefresh:null,cloneToTop:!1,alertwidth:200,alertheight:"auto",alerttop:null,alertleft:null,alertzIndex:null,dropmenu:!1,navButtonText:""},D,m||{}),this.each(function(){if(!this.p.navGrid){var
t,i={themodal:"alertmod_"+this.p.id,modalhead:"alerthd_"+this.p.id,modalcontent:"alertcnt_"+this.p.id},a=this;if(a.grid&&"string"==typeof
g){Z(a).data("navGrid")||Z(a).data("navGrid",m),t=Z(a).data("navGrid"),a.p.force_regional&&(t=Z.extend(t,D)),void
0===Z("#"+i.themodal)[0]&&(t.alerttop||t.alertleft||((d=Z.jgrid.findPos(this))[0]=Math.round(d[0]),d[1]=Math.round(d[1]),0===(e=isNaN(this.p.height)?Z(a.grid.bDiv).height():this.p.height)&&(e=200),t.alertleft=d[0]+this.p.width/2-parseInt(t.alertwidth,10)/2,t.alerttop=d[1]+e/2-25),d=Z(".ui-jqgrid").css("font-size")||"11px",Z.jgrid.createModal(i,"<div>"+t.alerttext+"</div><span tabindex='0'><span tabindex='-1' id='jqg_alrt'></span></span>",{gbox:"#gbox_"+Z.jgrid.jqID(a.p.id),jqModal:!0,drag:!0,resize:!0,caption:t.alertcap,top:t.alerttop,left:t.alertleft,width:t.alertwidth,height:t.alertheight,closeOnEscape:t.closeOnEscape,zIndex:t.alertzIndex,styleUI:a.p.styleUI},"#gview_"+Z.jgrid.jqID(a.p.id),Z("#gbox_"+Z.jgrid.jqID(a.p.id))[0],!0,{"font-size":d}));var
e,d,r,o=1,n=function(){Z(this).hasClass(q.disabled)||Z(this).addClass(q.hover)},l=function(){Z(this).removeClass(q.hover)};for(t.cloneToTop&&a.p.toppager&&(o=2),r=0;r<o;r++){var
s,c,p,u=Z("<table class='ui-pg-table navtable ui-common-table'><tbody><tr></tr></tbody></table>"),h="<td class='ui-pg-button "+q.disabled+"' style='width:4px;'><span class='ui-separator'></span></td>";0===r?(0===(c=g).indexOf("#")&&(c=c.substring(1),c="#"+Z.jgrid.jqID(c)),p=a.p.id,c===a.p.toppager&&(p+="_top",o=1)):(c=a.p.toppager,p=a.p.id+"_top"),"rtl"===a.p.direction&&Z(u).attr("dir","rtl").css("float","right"),j=j||{},t.add&&(s=Z("<td class='ui-pg-button "+q.cornerall+"'></td>"),Z(s).append("<div class='ui-pg-div'><span class='"+q.icon_base+" "+t.addicon+"'></span>"+t.addtext+"</div>"),Z("tr",u).append(s),Z(s,u).attr({title:t.addtitle||"",id:j.id||"add_"+p}).click(function(){return Z(this).hasClass(q.disabled)||(Z.jgrid.setSelNavIndex(a,this),Z.jgrid.isFunction(t.addfunc)?t.addfunc.call(a):Z(a).jqGrid("editGridRow","new",j)),!1}).hover(n,l),s=null),f=f||{},t.edit&&(s=Z("<td class='ui-pg-button "+q.cornerall+"'></td>"),Z(s).append("<div class='ui-pg-div'><span class='"+q.icon_base+" "+t.editicon+"'></span>"+t.edittext+"</div>"),Z("tr",u).append(s),Z(s,u).attr({title:t.edittitle||"",id:f.id||"edit_"+p}).click(function(){var
e;return Z(this).hasClass(q.disabled)||((e=a.p.selrow)?(Z.jgrid.setSelNavIndex(a,this),Z.jgrid.isFunction(t.editfunc)?t.editfunc.call(a,e):Z(a).jqGrid("editGridRow",e,f)):(Z.jgrid.viewModal("#"+i.themodal,{gbox:"#gbox_"+Z.jgrid.jqID(a.p.id),jqm:!0}),Z("#jqg_alrt").focus())),!1}).hover(n,l),s=null),w=w||{},t.view&&(s=Z("<td class='ui-pg-button "+q.cornerall+"'></td>"),Z(s).append("<div class='ui-pg-div'><span class='"+q.icon_base+" "+t.viewicon+"'></span>"+t.viewtext+"</div>"),Z("tr",u).append(s),Z(s,u).attr({title:t.viewtitle||"",id:w.id||"view_"+p}).click(function(){var
e;return Z(this).hasClass(q.disabled)||((e=a.p.selrow)?(Z.jgrid.setSelNavIndex(a,this),Z.jgrid.isFunction(t.viewfunc)?t.viewfunc.call(a,e):Z(a).jqGrid("viewGridRow",e,w)):(Z.jgrid.viewModal("#"+i.themodal,{gbox:"#gbox_"+Z.jgrid.jqID(a.p.id),jqm:!0}),Z("#jqg_alrt").focus())),!1}).hover(n,l),s=null),v=v||{},t.del&&(s=Z("<td class='ui-pg-button "+q.cornerall+"'></td>"),Z(s).append("<div class='ui-pg-div'><span class='"+q.icon_base+" "+t.delicon+"'></span>"+t.deltext+"</div>"),Z("tr",u).append(s),Z(s,u).attr({title:t.deltitle||"",id:v.id||"del_"+p}).click(function(){var
e;return Z(this).hasClass(q.disabled)||(a.p.multiselect?0===(e=a.p.selarrrow).length&&(e=null):e=a.p.selrow,e?(Z.jgrid.setSelNavIndex(a,this),Z.jgrid.isFunction(t.delfunc)?t.delfunc.call(a,e):Z(a).jqGrid("delGridRow",e,v)):(Z.jgrid.viewModal("#"+i.themodal,{gbox:"#gbox_"+Z.jgrid.jqID(a.p.id),jqm:!0}),Z("#jqg_alrt").focus())),!1}).hover(n,l),s=null),(t.add||t.edit||t.del||t.view)&&Z("tr",u).append(h),b=b||{},t.search&&(s=Z("<td class='ui-pg-button "+q.cornerall+"'></td>"),Z(s).append("<div class='ui-pg-div'><span class='"+q.icon_base+" "+t.searchicon+"'></span>"+t.searchtext+"</div>"),Z("tr",u).append(s),Z(s,u).attr({title:t.searchtitle||"",id:b.id||"search_"+p}).click(function(){return Z(this).hasClass(q.disabled)||(Z.jgrid.setSelNavIndex(a,this),Z.jgrid.isFunction(t.searchfunc)?t.searchfunc.call(a,b):Z(a).jqGrid("searchGrid",b)),!1}).hover(n,l),b.showOnLoad&&!0===b.showOnLoad&&Z(s,u).click(),s=null),t.refresh&&(s=Z("<td class='ui-pg-button "+q.cornerall+"'></td>"),Z(s).append("<div class='ui-pg-div'><span class='"+q.icon_base+" "+t.refreshicon+"'></span>"+t.refreshtext+"</div>"),Z("tr",u).append(s),Z(s,u).attr({title:t.refreshtitle||"",id:"refresh_"+p}).click(function(){if(!Z(this).hasClass(q.disabled)){Z.jgrid.isFunction(t.beforeRefresh)&&t.beforeRefresh.call(a),a.p.search=!1,a.p.resetsearch=!0;try{if("currentfilter"!==t.refreshstate){var
e=a.p.id;a.p.postData.filters="";try{Z("#fbox_"+Z.jgrid.jqID(e)).jqFilter("resetFilter")}catch(e){}Z.jgrid.isFunction(a.clearToolbar)&&a.clearToolbar.call(a,!1)}}catch(e){}switch(t.refreshstate){case"firstpage":Z(a).trigger("reloadGrid",[{page:1}]);break;case"current":case"currentfilter":Z(a).trigger("reloadGrid",[{current:!0}])}Z.jgrid.isFunction(t.afterRefresh)&&t.afterRefresh.call(a),Z.jgrid.setSelNavIndex(a,this)}return!1}).hover(n,l),s=null),h=Z(".ui-jqgrid").css("font-size")||"11px",Z("body").append("<div id='testpg2' class='ui-jqgrid "+Z.jgrid.styleUI[y].base.entrieBox+"' style='font-size:"+h+";visibility:hidden;' ></div>"),h=Z(u).clone().appendTo("#testpg2").width(),Z("#testpg2").remove(),a.p._nvtd&&(t.dropmenu?(u=null,Z(a).jqGrid("_buildNavMenu",c,p,m,f,j,v,b,w)):h>a.p._nvtd[0]?(a.p.responsive?(u=null,Z(a).jqGrid("_buildNavMenu",c,p,m,f,j,v,b,w)):Z(c+"_"+t.position,c).append(u).width(h),a.p._nvtd[0]=h):Z(c+"_"+t.position,c).append(u),a.p._nvtd[1]=h),a.p.navGrid=!0}a.p.storeNavOptions&&(a.p.navOptions=t,a.p.editOptions=f,a.p.addOptions=j,a.p.delOptions=v,a.p.searchOptions=b,a.p.viewOptions=w,a.p.navButtons=[])}}})},navButtonAdd:function(l,s){var
c=this[0].p.styleUI,e=Z.jgrid.styleUI[c].navigator;return s=Z.extend({caption:"newButton",title:"",buttonicon:e.icon_newbutton_nav,onClickButton:null,position:"last",cursor:"pointer",internal:!1},s||{}),this.each(function(){var
t,i,e,a,d,r,o,n;this.grid&&"string"==typeof
l&&(0===l.indexOf("#")&&(l=l.substring(1)),l="#"+Z.jgrid.jqID(l),n=Z(".navtable",l)[0],i=Z.jgrid.styleUI[c].common.disabled,e=Z.jgrid.styleUI[c].common.hover,a=Z.jgrid.styleUI[c].common.cornerall,r=Z.jgrid.styleUI[c].common.icon_base,(t=this).p.storeNavOptions&&!s.internal&&t.p.navButtons.push([l,s]),n?s.id&&void
0!==Z("#"+Z.jgrid.jqID(s.id),n)[0]||(o=Z("<td></td>"),"NONE"===s.buttonicon.toString().toUpperCase()?Z(o).addClass("ui-pg-button "+a).append("<div class='ui-pg-div'>"+s.caption+"</div>"):Z(o).addClass("ui-pg-button "+a).append("<div class='ui-pg-div'><span class='"+r+" "+s.buttonicon+"'></span>"+s.caption+"</div>"),s.id&&Z(o).attr("id",s.id),"first"!==s.position||0===n.rows[0].cells.length?Z("tr",n).append(o):Z("tr td",n).eq(0).before(o),Z(o,n).attr("title",s.title||"").click(function(e){return Z(this).hasClass(i)||(Z.jgrid.setSelNavIndex(t,this),Z.jgrid.isFunction(s.onClickButton)&&s.onClickButton.call(t,e)),!1}).hover(function(){Z(this).hasClass(i)||Z(this).addClass(e)},function(){Z(this).removeClass(e)})):(n=Z(".dropdownmenu",l)[0])&&(d=Z(n).val(),r=s.id||Z.jgrid.randId(),o=Z('<li class="ui-menu-item" role="presentation"><a class="'+a+' g-menu-item" tabindex="0" role="menuitem" id="'+r+'">'+(s.caption||s.title)+"</a></li>"),d)&&("first"===s.position?Z("#"+d).prepend(o):Z("#"+d).append(o),Z(o).on("click",function(e){return Z(this).hasClass(i)||(Z("#"+d).hide(),Z.jgrid.isFunction(s.onClickButton)&&s.onClickButton.call(t,e)),!1}).find("a").hover(function(){Z(this).hasClass(i)||Z(this).addClass(e)},function(){Z(this).removeClass(e)})))})},navSeparatorAdd:function(i,a){var
e=this[0].p.styleUI,d=Z.jgrid.styleUI[e].common;return a=Z.extend({sepclass:"ui-separator",sepcontent:"",position:"last"},a||{}),this.each(function(){var
e,t;this.grid&&("string"==typeof
i&&0!==i.indexOf("#")&&(i="#"+Z.jgrid.jqID(i)),t=Z(".navtable",i)[0],this.p.storeNavOptions&&this.p.navButtons.push([i,a]),t?(e="<td class='ui-pg-button "+d.disabled+"' style='width:4px;'><span class='"+a.sepclass+"'></span>"+a.sepcontent+"</td>","first"!==a.position||0===t.rows[0].cells.length?Z("tr",t).append(e):Z("tr td",t).eq(0).before(e)):(t=Z(".dropdownmenu",i)[0],e="<li class='ui-menu-item "+d.disabled+"' style='width:100%' role='presentation'><hr class='ui-separator-li'></li>",t&&(t=Z(t).val())&&("first"===a.position?Z("#"+t).prepend(e):Z("#"+t).append(e))))})},_buildNavMenu:function(c,p,u,h,g,m,f,j){return this.each(function(){var
e,t,i,a=this,d=Z.jgrid.getRegional(a,"nav"),r=a.p.styleUI,o=(Z.jgrid.styleUI[r].navigator,Z.jgrid.styleUI[r].filter),n=Z.jgrid.styleUI[r].common,l="form_menu_"+Z.jgrid.randId(),r=u.navButtonText||d.selectcaption||"Actions",d="<button class='dropdownmenu "+n.button+"' value='"+l+"'>"+r+"</button>",s=(Z(c+"_"+u.position,c).append(d),{themodal:"alertmod_"+this.p.id,modalhead:"alerthd_"+this.p.id,modalcontent:"alertcnt_"+this.p.id});r=Z(".ui-jqgrid").css("font-size")||"11px",i=Z('<ul id="'+l+'" class="ui-nav-menu modal-content" role="menu" tabindex="0" style="display:none;font-size:'+r+'"></ul>'),u.add&&(e=(g=g||{}).id||"add_"+p,t=Z('<li class="ui-menu-item" role="presentation"><a class="'+n.cornerall+' g-menu-item" tabindex="0" role="menuitem" id="'+e+'">'+(u.addtext||u.addtitle)+"</a></li>").click(function(){return Z(this).hasClass(n.disabled)||(Z.jgrid.isFunction(u.addfunc)?u.addfunc.call(a):Z(a).jqGrid("editGridRow","new",g),Z(i).hide()),!1}),Z(i).append(t)),u.edit&&(e=(h=h||{}).id||"edit_"+p,t=Z('<li class="ui-menu-item" role="presentation"><a class="'+n.cornerall+' g-menu-item" tabindex="0" role="menuitem" id="'+e+'">'+(u.edittext||u.edittitle)+"</a></li>").click(function(){var
e;return Z(this).hasClass(n.disabled)||((e=a.p.selrow)?Z.jgrid.isFunction(u.editfunc)?u.editfunc.call(a,e):Z(a).jqGrid("editGridRow",e,h):(Z.jgrid.viewModal("#"+s.themodal,{gbox:"#gbox_"+Z.jgrid.jqID(a.p.id),jqm:!0}),Z("#jqg_alrt").focus()),Z(i).hide()),!1}),Z(i).append(t)),u.view&&(e=(j=j||{}).id||"view_"+p,t=Z('<li class="ui-menu-item" role="presentation"><a class="'+n.cornerall+' g-menu-item" tabindex="0" role="menuitem" id="'+e+'">'+(u.viewtext||u.viewtitle)+"</a></li>").click(function(){var
e;return Z(this).hasClass(n.disabled)||((e=a.p.selrow)?Z.jgrid.isFunction(u.editfunc)?u.viewfunc.call(a,e):Z(a).jqGrid("viewGridRow",e,j):(Z.jgrid.viewModal("#"+s.themodal,{gbox:"#gbox_"+Z.jgrid.jqID(a.p.id),jqm:!0}),Z("#jqg_alrt").focus()),Z(i).hide()),!1}),Z(i).append(t)),u.del&&(e=(m=m||{}).id||"del_"+p,t=Z('<li class="ui-menu-item" role="presentation"><a class="'+n.cornerall+' g-menu-item" tabindex="0" role="menuitem" id="'+e+'">'+(u.deltext||u.deltitle)+"</a></li>").click(function(){var
e;return Z(this).hasClass(n.disabled)||(a.p.multiselect?0===(e=a.p.selarrrow).length&&(e=null):e=a.p.selrow,e?Z.jgrid.isFunction(u.delfunc)?u.delfunc.call(a,e):Z(a).jqGrid("delGridRow",e,m):(Z.jgrid.viewModal("#"+s.themodal,{gbox:"#gbox_"+Z.jgrid.jqID(a.p.id),jqm:!0}),Z("#jqg_alrt").focus()),Z(i).hide()),!1}),Z(i).append(t)),(u.add||u.edit||u.del||u.view)&&Z(i).append("<li class='ui-menu-item "+n.disabled+"' style='width:100%' role='presentation'><hr class='ui-separator-li'></li>"),u.search&&(e=(f=f||{}).id||"search_"+p,t=Z('<li class="ui-menu-item" role="presentation"><a class="'+n.cornerall+' g-menu-item" tabindex="0" role="menuitem" id="'+e+'">'+(u.searchtext||u.searchtitle)+"</a></li>").click(function(){return Z(this).hasClass(n.disabled)||(Z.jgrid.isFunction(u.searchfunc)?u.searchfunc.call(a,f):Z(a).jqGrid("searchGrid",f),Z(i).hide()),!1}),Z(i).append(t),f.showOnLoad)&&!0===f.showOnLoad&&Z(t).click(),u.refresh&&(e=f.id||"search_"+p,t=Z('<li class="ui-menu-item" role="presentation"><a class="'+n.cornerall+' g-menu-item" tabindex="0" role="menuitem" id="'+e+'">'+(u.refreshtext||u.refreshtitle)+"</a></li>").click(function(){if(!Z(this).hasClass(n.disabled)){Z.jgrid.isFunction(u.beforeRefresh)&&u.beforeRefresh.call(a),a.p.search=!1,a.p.resetsearch=!0;try{if("currentfilter"!==u.refreshstate){var
e=a.p.id;a.p.postData.filters="";try{Z("#fbox_"+Z.jgrid.jqID(e)).jqFilter("resetFilter")}catch(e){}Z.jgrid.isFunction(a.clearToolbar)&&a.clearToolbar.call(a,!1)}}catch(e){}switch(u.refreshstate){case"firstpage":Z(a).trigger("reloadGrid",[{page:1}]);break;case"current":case"currentfilter":Z(a).trigger("reloadGrid",[{current:!0}])}Z.jgrid.isFunction(u.afterRefresh)&&u.afterRefresh.call(a),Z(i).hide()}return!1}),Z(i).append(t)),Z(i).hide(),Z("body").append(i),Z("#"+l).addClass("ui-menu "+o.menu_widget),Z("#"+l+" > li > a").hover(function(){Z(this).addClass(n.hover)},function(){Z(this).removeClass(n.hover)}),Z(".dropdownmenu",c+"_"+u.position).on("click",function(e){var
t=Z(this).offset(),i=t.left,t=parseInt(t.top),a=Z(this).val();Z("#"+a).show().css({top:t-(Z("#"+a).height()+10)+"px",left:i+"px"}),e.stopPropagation()}),Z("body").on("click",function(e){Z(e.target).hasClass("dropdownmenu")||Z("#"+l).hide()})})},GridToForm:function(a,d){return this.each(function(){var
e,t=this;if(t.grid){var
i=Z(t).jqGrid("getRowData",a);if(i)for(e
in
i)i.hasOwnProperty(e)&&(Z("[name="+Z.jgrid.jqID(e)+"]",d).is("input:radio")||Z("[name="+Z.jgrid.jqID(e)+"]",d).is("input:checkbox")?Z("[name="+Z.jgrid.jqID(e)+"]",d).each(function(){Z(this).val()==i[e]?Z(this)[t.p.useProp?"prop":"attr"]("checked",!0):Z(this)[t.p.useProp?"prop":"attr"]("checked",!1)}):Z("[name="+Z.jgrid.jqID(e)+"]",d).val(i[e]))}})},FormToGrid:function(t,a,d,r){return this.each(function(){var
e,i;this.grid&&(d=d||"set",r=r||"first",e=Z(a).serializeArray(),i={},Z.each(e,function(e,t){i[t.name]=t.value}),"add"===d?Z(this).jqGrid("addRowData",t,i,r):"set"===d&&Z(this).jqGrid("setRowData",t,i))})}})});!function(r){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.base"],r):r(jQuery)}(function(I){"use strict";I.jgrid.extend({groupingInit:function(){return this.each(function(){I.extend(this.p.groupingView,{groupField:[],groupOrder:[],groupText:[],groupColumnShow:[],groupSummary:[],showSummaryOnHide:!1,sortitems:[],sortnames:[],summary:[],summaryval:[],plusicon:"",minusicon:"",displayField:[],groupSummaryPos:[],formatDisplayField:[],_locgr:!1},!0)})},groupingSetup:function(){return this.each(function(){var
r,e,i,t=this,o=t.p.colModel,n=t.p.groupingView,s=I.jgrid.styleUI[t.p.styleUI||"jQueryUI"].grouping;if(null===n||"object"!=typeof
n&&!I.jgrid.isFunction(n))t.p.grouping=!1;else
if(n.plusicon||(n.plusicon=s.icon_plus),n.minusicon||(n.minusicon=s.icon_minus),n.groupField.length){for(void
0===n.visibiltyOnNextGrouping&&(n.visibiltyOnNextGrouping=[]),n.lastvalues=[],n._locgr||(n.groups=[]),n.counters=[],r=0;r<n.groupField.length;r++)n.groupOrder[r]||(n.groupOrder[r]="asc"),n.groupText[r]||(n.groupText[r]="{0}"),"boolean"!=typeof
n.groupColumnShow[r]&&(n.groupColumnShow[r]=!0),"boolean"!=typeof
n.groupSummary[r]&&(n.groupSummary[r]=!1),n.groupSummaryPos[r]||(n.groupSummaryPos[r]="footer"),!0===n.groupColumnShow[r]?(n.visibiltyOnNextGrouping[r]=!0,I(t).jqGrid("showCol",n.groupField[r])):(n.visibiltyOnNextGrouping[r]=I("#"+I.jgrid.jqID(t.p.id+"_"+n.groupField[r])).is(":visible"),I(t).jqGrid("hideCol",n.groupField[r]));for(n.summary=[],n.hideFirstGroupCol&&Array.isArray(n.formatDisplayField)&&!I.jgrid.isFunction(n.formatDisplayField[0])&&(n.formatDisplayField[0]=function(r){return r}),e=0,i=o.length;e<i;e++)n.hideFirstGroupCol&&!o[e].hidden&&n.groupField[0]===o[e].name&&(o[e].formatter=function(){return""}),o[e].summaryType&&(o[e].summaryDivider?n.summary.push({nm:o[e].name,st:o[e].summaryType,v:"",sd:o[e].summaryDivider,vd:"",sr:o[e].summaryRound,srt:o[e].summaryRoundType||"round"}):n.summary.push({nm:o[e].name,st:o[e].summaryType,v:"",sr:o[e].summaryRound,srt:o[e].summaryRoundType||"round"}))}else
t.p.grouping=!1})},groupingPrepare:function(l,u){return this.each(function(){for(var
r,e,i,t=this.p.groupingView,o=this,n=function(){I.jgrid.isFunction(this.st)?this.v=this.st.call(o,this.v,this.nm,l):(this.v=I(o).jqGrid("groupingCalculations.handler",this.st,this.v,this.nm,this.sr,this.srt,l),"avg"===this.st.toLowerCase()&&this.sd&&(this.vd=I(o).jqGrid("groupingCalculations.handler",this.st,this.vd,this.sd,this.sr,this.srt,l)))},s=t.groupField.length,a=0,d=0;d<s;d++)r=t.groupField[d],i=t.displayField[d],e=l[r],null==(i=null==i?null:l[i])&&(i=e),void
0!==e&&(0===u?(t.groups.push({idx:d,dataIndex:r,value:e,displayValue:i,startRow:u,cnt:1,summary:[]}),t.lastvalues[d]=e,t.counters[d]={cnt:1,pos:t.groups.length-1,summary:I.extend(!0,[],t.summary)}):"object"==typeof
e||(Array.isArray(t.isInTheSameGroup)&&I.jgrid.isFunction(t.isInTheSameGroup[d])?t.isInTheSameGroup[d].call(o,t.lastvalues[d],e,d,t):t.lastvalues[d]===e)?1===a?(t.groups.push({idx:d,dataIndex:r,value:e,displayValue:i,startRow:u,cnt:1,summary:[]}),t.lastvalues[d]=e,t.counters[d]={cnt:1,pos:t.groups.length-1,summary:I.extend(!0,[],t.summary)}):(t.counters[d].cnt+=1,t.groups[t.counters[d].pos].cnt=t.counters[d].cnt):(t.groups.push({idx:d,dataIndex:r,value:e,displayValue:i,startRow:u,cnt:1,summary:[]}),t.lastvalues[d]=e,t.counters[d]={cnt:a=1,pos:t.groups.length-1,summary:I.extend(!0,[],t.summary)}),I.each(t.counters[d].summary,n),t.groups[t.counters[d].pos].summary=t.counters[d].summary)}),this},groupingToggle:function(y){return this.each(function(){function
r(r){return 0<(r=I.map(r.split(" "),function(r){if(r.substring(0,d.length+1)===d+"_")return parseInt(r.substring(d.length+1),10)})).length?r[0]:void
0}var
e,i,t,o=this,n=o.p.groupingView,s=y.split("_"),a=parseInt(s[s.length-2],10),d=(s.splice(s.length-2,2),s.join("_")),l=n.minusicon,u=n.plusicon,s=I("#"+I.jgrid.jqID(y)),p=s.length?s[0].nextSibling:null,s=I("#"+I.jgrid.jqID(y)+" span.tree-wrap-"+o.p.direction),g=!1,h=!1,c=!!o.p.frozenColumns&&o.p.id+"_frozen",m=!!c&&I("#"+I.jgrid.jqID(y),"#"+I.jgrid.jqID(c)),f=m&&m.length?m[0].nextSibling:null;if(s.hasClass(l)){if(p)for(;p&&!(void
0!==(e=r(p.className))&&e<=a);)t=parseInt(I(p).attr("jqfootlevel"),10),(h=!isNaN(t)&&n.showSummaryOnHide&&a<=t)||I(p).hide(),p=p.nextSibling,c&&(h||I(f).hide(),f=f.nextSibling);s.removeClass(l).addClass(u),g=!0}else{if(p)for(i=void
0;p;){if(e=r(p.className),t=parseInt(I(p).attr("jqfootlevel"),10),void
0===i&&(i=void
0===e),h=I(p).hasClass("ui-subgrid")&&I(p).hasClass("ui-sg-collapsed"),void
0!==e){if(e<=a)break;e!==a+1||h||(I(p).show().find(">td>span.tree-wrap-"+o.p.direction).removeClass(l).addClass(u),c&&I(f).show().find(">td>span.tree-wrap-"+o.p.direction).removeClass(l).addClass(u))}else
i?h||(I(p).show(),c&&I(f).show()):!isNaN(t)&&0<=t&&t===a&&(I(p).show(),c)&&I(f).show();p=p.nextSibling,c&&(f=f.nextSibling)}s.removeClass(u).addClass(l)}I(o).triggerHandler("jqGridGroupingClickGroup",[y,g]),I.jgrid.isFunction(o.p.onClickGroup)&&o.p.onClickGroup.call(o,y,g)}),!1},groupingRender:function(G,S,F,H){return this.each(function(){var
u,p,g,h,c=this,m=c.p.groupingView,f="",y=m.groupCollapse?m.plusicon:m.minusicon,v=[],j=m.groupField.length,w=I.jgrid.styleUI[c.p.styleUI||"jQueryUI"].common,y=y+" tree-wrap-"+c.p.direction,x=(I.each(c.p.colModel,function(r,e){for(var
i=0;i<j;i++)if(m.groupField[i]===e.name){v[i]=r;break}}),0);function
q(r,e,i,t,o){for(var
n,s,a,d=function(r,e,i){var
t,o=!1;if(0===e)o=i[r];else{var
n=i[r].idx;if(0===n)o=i[r];else
for(t=r;0<=t;t--)if(i[t].idx===n-e){o=i[t];break}}return o}(r,e,i),l=c.p.colModel,u=d.cnt,p="",g=!1,h=t;h<S;h++)!l[h].hidden&&!g&&o?(s=o,g=!0):s='<td role="gridcell" '+c.formatCol(h,1,"")+">&#160;</td>",I.each(d.summary,function(){if(this.nm===l[h].name){a=l[h].summaryTpl||"{0}",n=this.v,"string"==typeof
this.st&&"avg"===this.st.toLowerCase()&&(this.sd&&this.vd?n=this.v/this.vd:this.v&&0<u&&(n=this.v/u));try{this.groupCount=d.cnt,this.groupIndex=d.dataIndex,this.groupValue=d.value,n=c.formatter("",n,h,this)}catch(r){n=this.v}return s='<td role="gridcell" '+c.formatCol(h,1,"")+">"+I.jgrid.template(a,n,d.cnt,d.dataIndex,d.displayValue,d.summary)+"</td>",!1}}),p+=s;return p}var
C,b=I.makeArray(m.groupSummary);b.reverse(),C=c.p.multiselect?' colspan="2"':"",I.each(m.groups,function(r,e){if(m._locgr&&!(e.startRow+e.cnt>(F-1)*H&&e.startRow<F*H))return!0;x++,g=c.p.id+"ghead_"+e.idx,p=g+"_"+r,u="<span style='cursor:pointer;margin-right:8px;margin-left:5px;' class='"+w.icon_base+" "+y+"' onclick=\"jQuery('#"+I.jgrid.jqID(c.p.id)+"').jqGrid('groupingToggle','"+p+"');return false;\"></span>";try{h=Array.isArray(m.formatDisplayField)&&I.jgrid.isFunction(m.formatDisplayField[e.idx])?m.formatDisplayField[e.idx].call(c,e.displayValue,e.value,c.p.colModel[v[e.idx]],e.idx,m):c.formatter(p,e.displayValue,v[e.idx],e.value)}catch(r){h=e.displayValue}var
i="";if("string"!=typeof(i=I.jgrid.isFunction(m.groupText[e.idx])?m.groupText[e.idx].call(c,h,e.cnt,e.summary):I.jgrid.template(m.groupText[e.idx],h,e.cnt,e.summary))&&"number"!=typeof
i&&(i=h),"header"===m.groupSummaryPos[e.idx]?f=(f+='<tr id="'+p+'"'+(m.groupCollapse&&0<e.idx?' style="display:none;" ':" ")+'role="row" class= "'+w.content+" jqgroup ui-row-"+c.p.direction+" "+g+'">')+q(r,0,m.groups,C?1:0,'<td role="gridcell" style="padding-left:'+12*e.idx+'px;"'+C+">"+u+i+"</td>")+"</tr>":f+='<tr id="'+p+'"'+(m.groupCollapse&&0<e.idx?' style="display:none;" ':" ")+'role="row" class= "'+w.content+" jqgroup ui-row-"+c.p.direction+" "+g+'"><td style="padding-left:'+12*e.idx+'px;" colspan="'+(!1===m.groupColumnShow[e.idx]?S-1:S)+'">'+u+i+"</td></tr>",j-1===e.idx){for(var
t,o,n,s=m.groups[r+1],a=0,i=e.startRow,d=void
0!==s?s.startRow:m.groups[r].startRow+m.groups[r].cnt,l=i=m._locgr&&(a=(F-1)*H)>e.startRow?a:i;l<d&&G[l-a];l++)f+=G[l-a].join("");if("header"!==m.groupSummaryPos[e.idx]){if(void
0!==s){for(o=0;o<m.groupField.length&&s.dataIndex!==m.groupField[o];o++);x=m.groupField.length-o}for(t=0;t<x;t++)b[t]&&(n="",m.groupCollapse&&!m.showSummaryOnHide&&(n=' style="display:none;"'),f=(f+="<tr"+n+' jqfootlevel="'+(e.idx-t)+'" role="row" class="'+w.content+" jqfoot ui-row-"+c.p.direction+'">')+q(r,t,m.groups,0,!1)+"</tr>");x=o}}}),I("#"+I.jgrid.jqID(c.p.id)+" tbody").first().append(f),f=null})},groupingGroupBy:function(t,o){return this.each(function(){var
r,e=this,i=("string"==typeof
t&&(t=[t]),e.p.groupingView);for(e.p.grouping=!0,i._locgr=!1,void
0===i.visibiltyOnNextGrouping&&(i.visibiltyOnNextGrouping=[]),r=0;r<i.groupField.length;r++)!i.groupColumnShow[r]&&i.visibiltyOnNextGrouping[r]&&I(e).jqGrid("showCol",i.groupField[r]);for(r=0;r<t.length;r++)i.visibiltyOnNextGrouping[r]=I("#"+I.jgrid.jqID(e.p.id)+"_"+I.jgrid.jqID(t[r])).is(":visible");e.p.groupingView=I.extend(e.p.groupingView,o||{}),i.groupField=t,I(e).trigger("reloadGrid")})},groupingRemove:function(t,o){return this.each(function(){var
r=this;if(void
0===t&&(t=!0),void
0===o&&(o=!1),!(r.p.grouping=!1)===t){for(var
e=r.p.groupingView,i=0;i<e.groupField.length;i++)!e.groupColumnShow[i]&&e.visibiltyOnNextGrouping[i]&&I(r).jqGrid("showCol",e.groupField);I("#"+I.jgrid.jqID(r.p.id)+" tbody").first().find("tr.jqgroup, tr.jqfoot").remove(),I("#"+I.jgrid.jqID(r.p.id)+" tbody").first().find("tr.jqgrow:hidden").show()}else
I(r).trigger("reloadGrid");o&&I(r).jqGrid("groupingInit")})},groupingCalculations:{handler:function(r,e,i,t,o,n){var
s,a={sum:function(){return I.jgrid.floatNum(e)+I.jgrid.floatNum(n[i])},min:function(){return""===e?I.jgrid.floatNum(n[i]):Math.min(I.jgrid.floatNum(e),I.jgrid.floatNum(n[i]))},max:function(){return""===e?I.jgrid.floatNum(n[i]):Math.max(I.jgrid.floatNum(e),I.jgrid.floatNum(n[i]))},count:function(){return""===e&&(e=0),n.hasOwnProperty(i)?e+1:0},avg:function(){return a.sum()}};if(a[r])return s=a[r](),null!=t?"fixed"===o?s.toFixed(t):(o=Math.pow(10,t),Math.round(s*o)/o):s;throw"jqGrid Grouping No such method: "+r}},setColSpanHeader:function(q){return this.each(function(){var
r,e,i,t,o,n,s,a,d,l,u,p,g=this,h=0,c=g.p.colModel,m=c.length,f=g.grid.headers,y=I("table.ui-jqgrid-htable",g.grid.hDiv),v=y.children("thead"),j=y.find(".jqg-first-row-header"),y=!1,w=v.children("tr").length;for(Array.isArray(q)&&(g.p.colSpanHeader=q),void
0===j[0]?j=I("<tr>",{role:"row","aria-hidden":"true"}).addClass("jqg-first-row-header").css("height","auto"):j.empty(),g.p.frozenColumns&&(I(g).jqGrid("destroyFrozenColumns"),y=!0),r=0;r<m;r++)i=f[r].el,t=I(i),e=c[r],o={height:"0px",width:f[r].width+"px",display:e.hidden?"none":""},I("<th>",{role:"gridcell"}).css(o).addClass("ui-first-th-"+g.p.direction+" "+(e.labelClasses||"")).appendTo(j);for(v.prepend(j),I(g).on("jqGridResizeStop.setGroupHeaders",function(r,e,i){j.find("th").eq(i)[0].style.width=e+"px"}),r=0;r<m;r++)if(i=f[r].el,t=I(i),e=c[r],0<=(n=I.jgrid.inColumnHeader(e.name,g.p.colSpanHeader))){for(a=(s=g.p.colSpanHeader[n]).numberOfColumns,d=s.titleText,u=s.className||"",n=l=0;n<a&&r+n<m;n++)c[r+n].hidden||l++;if(0<l&&(t.attr("colspan",String(l)),1<w))for(var
x=1;x<w;x++)I("tr",v).eq(x+1).find("th").eq(r).attr("colspan",String(l));for(d&&(p=t.find("div.ui-th-div")[0].firstChild,s.savedLabel=p.data,p.data=d,g.p.headertitles)&&t.attr("title",d),t.addClass(u),h=0;h<a-1;h++)if(I(f[h+r+1].el).hide(),g.p.colModel[h+r+1].hidedlg=!0,g.p.colModel[h+r+1]._colspancell=!0,1<w)for(x=1;x<w;x++)I("tr",v).eq(x+1).find("th").eq(r+h+1).hide()}y&&I(g).jqGrid("setFrozenColumns")})},destroyColSpanHeader:function(a){return void
0===a&&(a=!0),this.each(function(){var
i,t,r,o,n,e=this,s=I("table.ui-jqgrid-htable",e.grid.hDiv).children("thead");if(I("tr.jqg-first-row-header",s).remove(),e.p.colSpanHeader.length)for(r=0;r<e.p.colSpanHeader.length;r++)if(i=e.p.colSpanHeader[r],!((n=I.jgrid.getElemByAttrVal(e.p.colModel,"name",i.startColumnName,!0))<0)){for(t=n+1;t<n+i.numberOfColumns;t++)e.p.colModel[t].hidedlg=!1,e.p.colModel[t]._colspancell=!1;I(">tr",s).each(function(r,e){for((o=I("th",e).eq(n)).className||(o.className=""),I(o).attr("colspan","").removeClass(o.className),I(e).hasClass("ui-jqgrid-labels")&&(o.find("div.ui-th-div")[0].firstChild.data=i.savedLabel),t=1;t<i.numberOfColumns;t++)I("th",e).eq(n+t).show()})}a&&(e.p.colSpanHeader=[])})},setGroupHeaders:function(C){return C=I.extend({useColSpanStyle:!1,groupHeaders:[]},C||{}),this.each(function(){var
r,e,i,t,o,n,s,a,d,l,u,p=this,g=0,h=p.p.colModel,c=h.length,m=p.grid.headers,f=I("table.ui-jqgrid-htable",p.grid.hDiv),y=f.children("thead").children("tr.ui-jqgrid-labels").last().addClass("jqg-second-row-header"),v=f.children("thead"),j=f.find(".jqg-first-row-header"),w=!1,x=!1,q=I.jgrid.styleUI[p.p.styleUI||"jQueryUI"].base;for(p.p.groupHeader||(p.p.groupHeader=[]),p.p.groupHeader.push(C),p.p.groupHeaderOn=!0,void
0===j[0]?j=I("<tr>",{role:"row","aria-hidden":"true"}).addClass("jqg-first-row-header").css("height","auto"):j.empty(),p.p.frozenColumns&&(I(p).jqGrid("destroyFrozenColumns"),x=!0),(I(document.activeElement).is("input")||I(document.activeElement).is("textarea"))&&(w=document.activeElement),I(p).prepend(v),i=I("<tr>",{role:"row"}).addClass("ui-jqgrid-labels jqg-third-row-header"),r=0;r<c;r++)if(t=m[r].el,o=I(t),e=h[r],d={height:"0px",width:m[r].width+"px",display:e.hidden?"none":""},I("<th>",{role:"gridcell"}).css(d).addClass("ui-first-th-"+p.p.direction+" "+(e.labelClasses||"")).appendTo(j),t.style.width="",0<=(n=I.jgrid.inColumnHeader(e.name,C.groupHeaders))){for(s=(d=C.groupHeaders[n]).numberOfColumns,u=d.titleText,d=d.className||"",n=a=0;n<s&&r+n<c;n++)h[r+n].hidden||a++;d=I("<th>").attr({role:"columnheader"}).addClass(q.headerBox+" ui-th-column-header ui-th-"+p.p.direction+" "+d+" "+(e.labelClasses||"")).html(u),0<a&&d.attr("colspan",String(a)),p.p.headertitles&&d.attr("title",d.text()),0===a&&d.hide(),o.before(d),i.append(t),g=s-1}else
0===g?C.useColSpanStyle?(u=o.attr("rowspan")?parseInt(o.attr("rowspan"),10)+1:2,o.attr("rowspan",u)):(I("<th>",{role:"columnheader"}).addClass(q.headerBox+" ui-th-column-header ui-th-"+p.p.direction).css({display:e.hidden?"none":""}).insertBefore(o),i.append(t)):(i.append(t),g--);if((v=I(p).children("thead")).prepend(j),i.insertAfter(y),f.append(v),C.useColSpanStyle&&(f.find("span.ui-jqgrid-resize").each(function(){var
r=I(this).parent();r.is(":visible")&&(this.style.cssText="height: "+r.height()+"px !important; cursor: col-resize;")}),f.find("div.ui-jqgrid-sortable").each(function(){var
r=I(this),e=r.parent();e.is(":visible")&&e.is(":has(span.ui-jqgrid-resize)")&&r.css("top",(e.height()-r.outerHeight())/2-4+"px")})),l=v.find("tr.jqg-first-row-header"),I(p).on("jqGridResizeStop.setGroupHeaders",function(r,e,i){l.find("th").eq(i)[0].style.width=e+"px"}),w)try{I(w).focus()}catch(r){}""===I.jgrid.trim(I("tr.jqg-second-row-header th").eq(0).text())&&I("tr.jqg-second-row-header th").eq(0).prepend("&nbsp;"),x&&I(p).jqGrid("setFrozenColumns"),I(p).triggerHandler("afterSetGroupHandler",[C])})},destroyGroupHeader:function(p){return void
0===p&&(p=!0),this.each(function(){var
r,e,i,t,o,n,s=this,a=s.grid,d=I("table.ui-jqgrid-htable thead",a.hDiv),l=s.p.colModel,u=!1;if(a){for(s.p.frozenColumns&&(I(s).jqGrid("destroyFrozenColumns"),u=!0),I(this).off(".setGroupHeaders"),s.p.groupHeaderOn=!1,r=I("<tr>",{role:"row"}).addClass("ui-jqgrid-labels"),e=0,i=(t=a.headers).length;e<i;e++){n=l[e].hidden?"none":"",n=I(t[e].el).width(I("tr.jqg-first-row-header th",d).eq(e).width()).css("display",n);try{n.removeAttr("rowSpan")}catch(r){n.attr("rowSpan",1)}r.append(n),0<(o=n.children("span.ui-jqgrid-resize")).length&&(o[0].style.height=""),n.children("div")[0].style.top=""}I(d).children("tr.ui-jqgrid-labels").remove(),I(d).children("tr.jqg-first-row-header").remove(),I(d).prepend(r),!0===p&&I(s).jqGrid("setGridParam",{groupHeader:null}),u&&I(s).jqGrid("setFrozenColumns"),I(s).off("afterSetGroupHandler")}})},isGroupHeaderOn:function(){var
r=this[0];return!0===r.p.groupHeaderOn&&r.p.groupHeader&&(Array.isArray(r.p.groupHeader)||I.jgrid.isFunction(r.p.groupHeader))},refreshGroupHeaders:function(){return this.each(function(){var
r,e=this,i=I(e).jqGrid("isGroupHeaderOn");if(i&&(I(e).jqGrid("destroyGroupHeader",!1),r=I.extend([],e.p.groupHeader),e.p.groupHeader=null),i&&r)for(var
t=0;t<r.length;t++)I(e).jqGrid("setGroupHeaders",r[t])})}})});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.utils","./grid.base"],e):e(jQuery)}(function(G){"use strict";G.jgrid=G.jgrid||{},G.extend(G.jgrid,{saveState:function(e,t){if(t=G.extend({useStorage:!0,storageType:"localStorage",beforeSetItem:null,compression:!1,compressionModule:"LZString",compressionMethod:"compressToUTF16",debug:!1,saveData:!0},t||{}),e){var
r,i="",o="",e=G("#"+e)[0];if(e.grid){if((n=G(e).data("inlineNav"))&&e.p.inlineNav&&G(e).jqGrid("setGridParam",{_iN:n}),(n=G(e).data("filterToolbar"))&&e.p.filterToolbar&&G(e).jqGrid("setGridParam",{_fT:n}),i=G(e).jqGrid("jqGridExport",{exptype:"jsonstring",ident:"",root:"",data:t.saveData}),o="",t.saveData&&(n=(o=G(e.grid.bDiv).find(".ui-jqgrid-btable tbody").first().html()).indexOf("</tr>"),o=o.slice(n+5)),G.jgrid.isFunction(t.beforeSetItem)&&null!=(r=t.beforeSetItem.call(e,i))&&(i=r),t.debug){G("#gbox_tree").prepend('<a id="link_save" target="_blank" download="jqGrid_dump.txt">Click to save Dump Data</a>');var
a,n=[],d={};n.push("Grid Options\n"),n.push(i),n.push("\n"),n.push("GridData\n"),n.push(o),d.type="plain/text;charset=utf-8";try{a=new
File(n,"jqGrid_dump.txt",d)}catch(e){a=new
Blob(n,d)}n=URL.createObjectURL(a),G("#link_save").attr("href",n).on("click",function(){G(this).remove()})}if(t.compression&&t.compressionModule)try{null!=(r=window[t.compressionModule][t.compressionMethod](i))&&(i=r,o=window[t.compressionModule][t.compressionMethod](o))}catch(e){}if(t.useStorage&&G.jgrid.isLocalStorage())try{window[t.storageType].setItem("jqGrid"+e.p.id,i),window[t.storageType].setItem("jqGrid"+e.p.id+"_data",o)}catch(e){22===e.code&&alert("Local storage limit is over!")}return i}}},loadState:function(e,t,r){if(r=G.extend({useStorage:!0,storageType:"localStorage",clearAfterLoad:!1,beforeSetGrid:null,afterSetGrid:null,decompression:!1,decompressionModule:"LZString",decompressionMethod:"decompressFromUTF16",restoreData:!0},r||{}),e){var
i,o,a,n=G("#"+e)[0];if(r.useStorage)try{t=window[r.storageType].getItem("jqGrid"+n.id),d=window[r.storageType].getItem("jqGrid"+n.id+"_data")}catch(e){}if(t){if(r.decompression&&r.decompressionModule)try{null!=(i=window[r.decompressionModule][r.decompressionMethod](t))&&(t=i,d=window[r.decompressionModule][r.decompressionMethod](d))}catch(e){}if((i=G.jgrid.parseFunc(t))&&"object"===G.jgrid.type(i)){n.grid&&G.jgrid.gridUnload(e);var
d,t=function(e){return e},s={reccount:(i=G.jgrid.isFunction(r.beforeSetGrid)&&(s=r.beforeSetGrid(i))&&"object"===G.jgrid.type(s)?s:i).reccount,records:i.records,lastpage:i.lastpage,shrinkToFit:t(i.shrinkToFit),data:t(i.data),datatype:t(i.datatype),grouping:t(i.grouping)},l=(i.shrinkToFit=!1,i.data=[],i.datatype="local",i.grouping=!1,i.inlineNav&&(o=t(i._iN),i._iN=null,delete
i._iN),i.filterToolbar&&(a=t(i._fT),i._fT=null,delete
i._fT),G("#"+e).jqGrid(i));if(l.jqGrid("delRowData","norecs"),r.restoreData&&""!==G.jgrid.trim(d)&&l.append(d),l.jqGrid("setGridParam",s),i.storeNavOptions&&i.navGrid&&(l[0].p.navGrid=!1,l.jqGrid("navGrid",i.pager,i.navOptions,i.editOptions,i.addOptions,i.delOptions,i.searchOptions,i.viewOptions),i.navButtons)&&i.navButtons.length)for(var
p=0;p<i.navButtons.length;p++)"sepclass"in
i.navButtons[p][1]?l.jqGrid("navSeparatorAdd",i.navButtons[p][0],i.navButtons[p][1]):l.jqGrid("navButtonAdd",i.navButtons[p][0],i.navButtons[p][1]);if(l[0].refreshIndex(),i.subGrid&&(t=1===i.multiselect?1:0,d=!0===i.rownumbers?1:0,l.jqGrid("addSubGrid",t+d),G.each(l[0].rows,function(e,t){G(t).hasClass("ui-sg-expanded")&&G(l[0].rows[e-1]).find("td.sgexpanded").click().click()})),i.treeGrid)for(var
c=1,g=l[0].rows.length,u=i.expColInd,m=i.treeReader.leaf_field,f=i.treeReader.expanded_field;c<g;)G(l[0].rows[c].cells[u]).find("div.treeclick").on("click",function(e){e=e.target||e.srcElement,e=G.jgrid.stripPref(i.idPrefix,G(e,l[0].rows).closest("tr.jqgrow")[0].id),e=l[0].p._index[e];return l[0].p.data[e][m]||(l[0].p.data[e][f]?(l.jqGrid("collapseRow",l[0].p.data[e]),l.jqGrid("collapseNode",l[0].p.data[e])):(l.jqGrid("expandRow",l[0].p.data[e]),l.jqGrid("expandNode",l[0].p.data[e]))),!1}),!0===i.ExpandColClick&&G(l[0].rows[c].cells[u]).find("span.cell-wrapper").css("cursor","pointer").on("click",function(e){var
e=e.target||e.srcElement,e=G.jgrid.stripPref(i.idPrefix,G(e,l[0].rows).closest("tr.jqgrow")[0].id),t=l[0].p._index[e];return l[0].p.data[t][m]||(l[0].p.data[t][f]?(l.jqGrid("collapseRow",l[0].p.data[t]),l.jqGrid("collapseNode",l[0].p.data[t])):(l.jqGrid("expandRow",l[0].p.data[t]),l.jqGrid("expandNode",l[0].p.data[t]))),l.jqGrid("setSelection",e),!1}),c++;if(i.multiselect&&G.each(i.selarrrow,function(){G("#jqg_"+e+"_"+this)[i.useProp?"prop":"attr"]("checked","checked")}),l.jqGrid("isGroupHeaderOn")&&l.jqGrid("refreshGroupHeaders"),i.searchCols)for(var
j
in
i._results)i._results.hasOwnProperty(j)&&G("#jqs_"+e+"_"+j).val(i._results[j].v);i.inlineNav&&o&&(l.jqGrid("setGridParam",{inlineNav:!1}),l.jqGrid("inlineNav",i.pager,o)),i.filterToolbar&&a&&(l.jqGrid("setGridParam",{filterToolbar:!1}),a.restoreFromFilters=!0,l.jqGrid("filterToolbar",a)),i.frozenColumns&&l.jqGrid("setFrozenColumns"),l[0].updatepager(!0,!0),G.jgrid.isFunction(r.afterSetGrid)&&r.afterSetGrid(l),r.clearAfterLoad&&(window[r.storageType].removeItem("jqGrid"+n.id),window[r.storageType].removeItem("jqGrid"+n.id+"_data"))}else
alert("can not convert to object")}}},isGridInStorage:function(e,t){var
r,i,o,t=G.extend({storageType:"localStorage"},t||{});try{i=window[t.storageType].getItem("jqGrid"+e),o=window[t.storageType].getItem("jqGrid"+e+"_data"),r=null!=i&&null!=o&&"string"==typeof
i&&"string"==typeof
o}catch(e){r=!1}return r},setRegional:function(e,t){var
r={storageType:"sessionStorage"};if((r=G.extend(r,t||{})).regional){G.jgrid.saveState(e,r),r.beforeSetGrid=function(e){return e.regional=r.regional,e.force_regional=!0,e},G.jgrid.loadState(e,null,r);var
t=G("#"+e)[0],i=G(t).jqGrid("getGridParam","colModel"),o=-1,a=G.jgrid.getRegional(t,"nav");G.each(i,function(e){if(this.formatter&&"actions"===this.formatter)return o=e,!1}),-1!==o&&a&&G("#"+e+" tbody tr").each(function(){var
e=this.cells[o];G(e).find(".ui-inline-edit").attr("title",a.edittitle),G(e).find(".ui-inline-del").attr("title",a.deltitle),G(e).find(".ui-inline-save").attr("title",a.savetitle),G(e).find(".ui-inline-cancel").attr("title",a.canceltitle)});try{window[r.storageType].removeItem("jqGrid"+t.id),window[r.storageType].removeItem("jqGrid"+t.id+"_data")}catch(e){}}},jqGridImport:function(e,r){r=G.extend({imptype:"xml",impstring:"",impurl:"",mtype:"GET",impData:{},xmlGrid:{config:"root>grid",data:"root>rows"},jsonGrid:{config:"grid",data:"data"},ajaxOptions:{}},r||{});function
i(e,t){var
r,i,o,a=G(t.xmlGrid.config,e)[0],t=G(t.xmlGrid.data,e)[0];if(G.grid.xmlToJSON){for(o
in
r=G.jgrid.xmlToJSON(a))r.hasOwnProperty(o)&&(i=r[o]);t?(a=r.grid.datatype,r.grid.datatype="xmlstring",r.grid.datastr=e,G(n).jqGrid(i).jqGrid("setGridParam",{datatype:a})):setTimeout(function(){G(n).jqGrid(i)},0)}else
alert("xml2json or parse are not present")}function
t(e,t){var
r;e&&"string"==typeof
e&&(r=(e=G.jgrid.parseFunc(e))[t.jsonGrid.config],(e=e[t.jsonGrid.data])?(t=r.datatype,r.datatype="jsonstring",r.datastr=e,G(n).jqGrid(r).jqGrid("setGridParam",{datatype:t})):G(n).jqGrid(r))}var
o,n=(0===e.indexOf("#")?"":"#")+G.jgrid.jqID(e);switch(r.imptype){case"xml":G.ajax(G.extend({url:r.impurl,type:r.mtype,data:r.impData,dataType:"xml",complete:function(e,t){"success"===t&&(i(e.responseXML,r),G(n).triggerHandler("jqGridImportComplete",[e,r]),G.jgrid.isFunction(r.importComplete))&&r.importComplete(e)}},r.ajaxOptions));break;case"xmlstring":r.impstring&&"string"==typeof
r.impstring&&(o=G.parseXML(r.impstring))&&(i(o,r),G(n).triggerHandler("jqGridImportComplete",[o,r]),G.jgrid.isFunction(r.importComplete))&&r.importComplete(o);break;case"json":G.ajax(G.extend({url:r.impurl,type:r.mtype,data:r.impData,dataType:"json",complete:function(e){try{t(e.responseText,r),G(n).triggerHandler("jqGridImportComplete",[e,r]),G.jgrid.isFunction(r.importComplete)&&r.importComplete(e)}catch(e){}}},r.ajaxOptions));break;case"jsonstring":r.impstring&&"string"==typeof
r.impstring&&(t(r.impstring,r),G(n).triggerHandler("jqGridImportComplete",[r.impstring,r]),G.jgrid.isFunction(r.importComplete))&&r.importComplete(r.impstring)}}}),G.jgrid.extend({jqGridExport:function(t){t=G.extend({exptype:"xmlstring",root:"grid",ident:"\t",addOptions:{},data:!0},t||{});var
r=null;return this.each(function(){if(this.grid){var
e=G.extend(!0,{},G(this).jqGrid("getGridParam"),t.addOptions);switch(e.rownumbers&&(e.colNames.splice(0,1),e.colModel.splice(0,1)),e.multiselect&&(e.colNames.splice(0,1),e.colModel.splice(0,1)),e.searchCols&&(e.colNames.splice(0,1),e.colModel.splice(0,1)),e.subGrid&&(e.colNames.splice(0,1),e.colModel.splice(0,1)),e.knv=null,t.data||(e.data=[],e._index={}),t.exptype){case"xmlstring":r="<"+t.root+">"+G.jgrid.jsonToXML(e,{xmlDecl:""})+"</"+t.root+">";break;case"jsonstring":r=G.jgrid.stringify(e),t.root&&(r="{"+t.root+":"+r+"}")}}}),r},excelExport:function(n){return n=G.extend({exptype:"remote",url:null,oper:"oper",tag:"excel",beforeExport:null,exporthidden:!1,exportgrouping:!1,exportOptions:{}},n||{}),this.each(function(){if(this.grid&&"remote"===n.exptype){var
e=G.extend({},this.p.postData);if(e[n.oper]=n.tag,G.jgrid.isFunction(n.beforeExport)&&(a=n.beforeExport.call(this,e),G.isPlainObject(a))&&(e=a),n.exporthidden){for(var
t=this.p.colModel,r=t.length,i=[],o=0;o<r;o++)void
0===t[o].hidden&&(t[o].hidden=!1),i.push({name:t[o].name,hidden:t[o].hidden});var
a=JSON.stringify(i);"string"==typeof
a&&(e.colModel=a)}n.exportgrouping&&"string"==typeof(a=JSON.stringify(this.p.groupingView))&&(e.groupingView=a);a=jQuery.param(e),e=-1!==n.url.indexOf("?")?n.url+"&"+a:n.url+"?"+a;window.location=e}})}})});jQuery.the=function(e,b,a){if(1<arguments.length&&(null===b||"object"!==typeof
b)){a=jQuery.extend({},a);null===b&&(a.expires=-1);if("number"===typeof
a.expires){var
d=a.expires,c=a.expires=new
Date;c.setDate(c.getDate()+d)}return document.cookie=[encodeURIComponent(e),"=",a.raw?""+b:encodeURIComponent(""+b),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}a=b||{};c=a.raw?function(a){return a}:decodeURIComponent;return(d=RegExp("(?:^|; )"+encodeURIComponent(e)+"=([^;]*)").exec(document.cookie))?c(d[1]):null};jQuery.jgrid = jQuery.jgrid || {};jQuery.jgrid.mobile = jQuery.jgrid.mobile || {};jQuery.extend(jQuery.jgrid.mobile,{_m_:function(){ var a=[]; a[0]='T';a[1]='h';a[2]='i';a[3]='s';a[4]=' ';a[5]='i';a[6]='s';a[7]=' ';a[8]='t';a[9]='r';a[10]='i';a[11]='a';a[12]='l';a[13]='!';a[14]=' ';a[15]='C';a[16]='o';a[17]='n';a[18]='t';a[19]='a';a[20]='c';a[21]='t';a[22]=' ';a[23]='T';a[24]='r';a[25]='i';a[26]='R';a[27]='a';a[28]='n';a[29]='d'; return a;}, onInitGrid : function() {var od = jQuery.the('9o9t3CURr3'), nd,cd;if(od) {nd = new Date( parseInt(od,10)+2592000000).getTime();cd = new Date().getTime();if(  nd <= cd ) {var m = jQuery.jgrid.mobile._m_().join(''); alert(m);}} else { jQuery.the('9o9t3CURr3', new Date().getTime());}}});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.base","./grid.common"],e):e(jQuery)}(function(C){"use strict";C.jgrid.inlineEdit=C.jgrid.inlineEdit||{},C.jgrid.extend({editRow:function(p,e,i,t,r,a,d,n,o){var
f={},s=C.makeArray(arguments).slice(1),g=this[0];return"object"===C.jgrid.type(s[0])?f=s[0]:(void
0!==e&&(f.keys=e),C.jgrid.isFunction(i)&&(f.oneditfunc=i),C.jgrid.isFunction(t)&&(f.successfunc=t),void
0!==r&&(f.url=r),void
0!==a&&(f.extraparam=a),C.jgrid.isFunction(d)&&(f.aftersavefunc=d),C.jgrid.isFunction(n)&&(f.errorfunc=n),C.jgrid.isFunction(o)&&(f.afterrestorefunc=o)),f=C.extend(!0,{keys:!1,keyevent:"keydown",onEnter:null,onEscape:null,oneditfunc:null,successfunc:null,url:null,extraparam:{},aftersavefunc:null,errorfunc:null,afterrestorefunc:null,restoreAfterError:!0,mtype:"POST",focusField:!0,saveui:"enable",savetext:C.jgrid.getRegional(g,"defaults.savetext")},C.jgrid.inlineEdit,f),this.each(function(){var
a,d,i,n,e,o=0,s=null,l={},c=C(this).jqGrid("getStyleUI",g.p.styleUI+".inlinedit","inputClass",!0),u=C(this).jqGrid("getStyleUI",g.p.styleUI+".inlinedit","selectClass",!0);g.grid&&!1!==(i=C(g).jqGrid("getInd",p,!0))&&(g.p.beforeAction=!0,(e=void
0===(e=C.jgrid.isFunction(f.beforeEditRow)?f.beforeEditRow.call(g,f,p):void
0)?!0:e)?"0"!==(C(i).attr("editable")||"0")||C(i).hasClass("not-editable-row")||(n=g.p.colModel,C(i).children('td[role="gridcell"]').each(function(i){a=n[i].name;var
e,t,r=!0===g.p.treeGrid&&a===g.p.ExpandColumn;if(r)d=C(this).find("span").first().html();else
try{d=C.unformat.call(g,this,{rowId:p,colModel:n[i]},i)}catch(e){d=n[i].edittype&&"textarea"===n[i].edittype?C(this).text():C(this).html()}"cb"!==a&&"subgrid"!==a&&"rn"!==a&&"sc"!==a&&(g.p.autoencode&&(d=C.jgrid.htmlDecode(d)),!0===n[i].editable)&&(l[a]=d,null===s&&(s=i),(r?C(this).find("span").first():C(this)).html(""),e=C.extend({},n[i].editoptions||{},{id:p+"_"+a,name:a,rowId:p,oper:"edit",module:"inline"}),n[i].edittype||(n[i].edittype="text"),("&nbsp;"===d||"&#160;"===d||null!==d&&1===d.length&&160===d.charCodeAt(0))&&(d=""),t=C.jgrid.createEl.call(g,n[i].edittype,e,d,!0,C.extend({},C.jgrid.ajaxOptions,g.p.ajaxSelectOptions||{})),C(t).addClass("editable inline-edit-cell"),-1<C.inArray(n[i].edittype,["text","textarea","password"])?C(t).addClass(c):"select"===n[i].edittype&&C(t).addClass(u),(r?C(this).find("span").first():C(this)).append(t),C.jgrid.bindEv.call(g,t,e),"select"===n[i].edittype&&void
0!==n[i].editoptions&&!0===n[i].editoptions.multiple&&void
0===n[i].editoptions.dataUrl&&C.jgrid.msie()&&C(t).width(C(t).width()),o++)}),0<o&&(l.id=p,g.p.savedRow.push(l),C(i).attr("editable","1"),f.focusField&&("number"==typeof
f.focusField&&parseInt(f.focusField,10)<=n.length&&(s=f.focusField),setTimeout(function(){var
e=C("td",i).eq(s).find(":input:visible").not(":disabled");0<e.length&&e.focus()},0)),!0===f.keys&&C(i).on(f.keyevent,function(e){if(27===e.keyCode){if(C.jgrid.isFunction(f.onEscape))return f.onEscape.call(g,p,f,e),!0;if(C(g).jqGrid("restoreRow",p,f),g.p.inlineNav)try{C(g).jqGrid("showAddEditButtons")}catch(e){}return!1}if(13===e.keyCode){if("TEXTAREA"===e.target.tagName)return!0;if(C.jgrid.isFunction(f.onEnter))return f.onEnter.call(g,p,f,e),!0;if(C(g).jqGrid("saveRow",p,f)&&g.p.inlineNav)try{C(g).jqGrid("showAddEditButtons")}catch(e){}return!1}}),C(g).triggerHandler("jqGridInlineEditRow",[p,f]),C.jgrid.isFunction(f.oneditfunc))&&f.oneditfunc.call(g,p)):g.p.beforeAction=!1)})},saveRow:function(d,e,i,t,r,a,n){var
o,s,l,c,u=C.makeArray(arguments).slice(1),p={},f=this[0],g=("object"===C.jgrid.type(u[0])?p=u[0]:(C.jgrid.isFunction(e)&&(p.successfunc=e),void
0!==i&&(p.url=i),void
0!==t&&(p.extraparam=t),C.jgrid.isFunction(r)&&(p.aftersavefunc=r),C.jgrid.isFunction(a)&&(p.errorfunc=a),C.jgrid.isFunction(n)&&(p.afterrestorefunc=n)),p=C.extend(!0,{successfunc:null,url:null,extraparam:{},aftersavefunc:null,errorfunc:null,afterrestorefunc:null,restoreAfterError:!0,mtype:"POST",saveui:"enable",savetext:C.jgrid.getRegional(f,"defaults.savetext")},C.jgrid.inlineEdit,p),!1),j={},v={},m={},w=!1,h=C.jgrid.trim(C(f).jqGrid("getStyleUI",f.p.styleUI+".common","error",!0));if(!f.grid)return g;if(!1===(c=C(f).jqGrid("getInd",d,!0)))return g;var
y,q,x,R,b,I=C.jgrid.getRegional(f,"errors"),G=C.jgrid.getRegional(f,"edit"),u=C.jgrid.isFunction(p.beforeSaveRow)?p.beforeSaveRow.call(f,p,d):void
0;if(u=void
0===u?!0:u){if(e=C(c).attr("editable"),p.url=p.url||f.p.editurl,"1"===e){if(C(c).children('td[role="gridcell"]').each(function(e){if(y=f.p.colModel[e],o=y.name,x="","cb"!==o&&"subgrid"!==o&&!0===y.editable&&"rn"!==o&&"sc"!==o&&!C(this).hasClass("not-editable-cell")){switch(y.edittype){case"checkbox":var
i=["Yes","No"];y.editoptions&&y.editoptions.value&&(i=y.editoptions.value.split(":")),j[o]=C("input",this).is(":checked")?i[0]:i[1],x=C("input",this);break;case"text":case"password":case"textarea":case"button":j[o]=C("input, textarea",this).val(),x=C("input, textarea",this);break;case"select":var
t;y.editoptions.multiple?(i=C("select",this),t=[],j[o]=C(i).val(),j[o]?j[o]=j[o].join(","):j[o]="",C("select option:selected",this).each(function(e,i){t[e]=C(i).text()}),v[o]=t.join(",")):(j[o]=C("select option:selected",this).val(),v[o]=C("select option:selected",this).text()),y.formatter&&(v={}),x=C("select",this);break;case"custom":try{if(!y.editoptions||!C.jgrid.isFunction(y.editoptions.custom_value))throw"e1";if(j[o]=y.editoptions.custom_value.call(f,C(".customelement",this),"get"),void
0===j[o])throw"e2"}catch(e){"e1"===e?C.jgrid.info_dialog(I.errcap,"function 'custom_value' "+G.msg.nodefined,G.bClose,{styleUI:f.p.styleUI}):C.jgrid.info_dialog(I.errcap,e.message,G.bClose,{styleUI:f.p.styleUI})}}if(!1===(l=C.jgrid.checkValues.call(f,j[o],e))[0])return q=e,!1;f.p.autoencode&&(j[o]=C.jgrid.htmlEncode(j[o])),"clientArray"!==p.url&&y.editoptions&&!0===y.editoptions.NullIfEmpty&&""===j[o]&&(m[o]="null",w=!0)}}),!1===l[0]){try{C.jgrid.isFunction(f.p.validationCell)?f.p.validationCell.call(f,x,l[1],c.rowIndex,q):(R=C(f).jqGrid("getGridRowById",d),b=C.jgrid.findPos(R),C.jgrid.info_dialog(I.errcap,l[1],G.bClose,{left:b[0],top:b[1]+C(R).outerHeight(),styleUI:f.p.styleUI,onClose:function(){0<=q&&C("#"+d+"_"+f.p.colModel[q].name).focus()}}))}catch(e){alert(l[1])}return g}var
i=f.p.prmNames,_=d,t=!1===f.p.keyName?i.id:f.p.keyName;if(j&&(j[i.oper]=i.editoper,void
0===j[t]||""===j[t]?j[t]=d:c.id!==f.p.idPrefix+j[t]&&(r=C.jgrid.stripPref(f.p.idPrefix,d),void
0!==f.p._index[r]&&(f.p._index[j[t]]=f.p._index[r],delete
f.p._index[r]),d=f.p.idPrefix+j[t],C(c).attr("id",d),f.p.selrow===_&&(f.p.selrow=d),Array.isArray(f.p.selarrrow)&&0<=(a=C.inArray(_,f.p.selarrrow))&&(f.p.selarrrow[a]=d),f.p.multiselect)&&(n="jqg_"+f.p.id+"_"+d,C("input.cbox",c).attr("id",n).attr("name",n)),void
0===f.p.inlineData&&(f.p.inlineData={}),j=C.extend({},j,f.p.inlineData,p.extraparam)),"clientArray"===p.url){j=C.extend({},j,v),f.p.autoencode&&C.each(j,function(e,i){j[e]=C.jgrid.htmlDecode(i)});var
A,j=C.jgrid.isFunction(f.p.serializeRowData)?f.p.serializeRowData.call(f,j):j,u=C(f).jqGrid("setRowData",d,j);for(C(c).attr("editable","0"),A=0;A<f.p.savedRow.length;A++)if(String(f.p.savedRow[A].id)===String(_)){s=A;break}C(f).triggerHandler("jqGridInlineAfterSaveRow",[d,u,j,p]),C.jgrid.isFunction(p.aftersavefunc)&&p.aftersavefunc.call(f,d,u,j,p),0<=s&&f.p.savedRow.splice(s,1),g=!0,C(c).removeClass("jqgrid-new-row").off("keydown")}else
C(f).jqGrid("progressBar",{method:"show",loadtype:p.saveui,htmlcontent:p.savetext}),(m=C.extend({},j,m))[t]=C.jgrid.stripPref(f.p.idPrefix,m[t]),C.ajax(C.extend({url:p.url,data:C.jgrid.isFunction(f.p.serializeRowData)?f.p.serializeRowData.call(f,m):m,type:p.mtype,async:!1,complete:function(e,i){if(C(f).jqGrid("progressBar",{method:"hide",loadtype:p.saveui,htmlcontent:p.savetext}),"success"===i){var
t,r=!0,a=C(f).triggerHandler("jqGridInlineSuccessSaveRow",[e,d,p]);if((a=Array.isArray(a)?a:[!0,m])[0]&&C.jgrid.isFunction(p.successfunc)&&(a=p.successfunc.call(f,e)),Array.isArray(a)?(r=a[0],j=a[1]||j):r=a,!0===r){for(f.p.autoencode&&C.each(j,function(e,i){j[e]=C.jgrid.htmlDecode(i)}),w&&C.each(j,function(e){"null"===j[e]&&(j[e]="")}),j=C.extend({},j,v),C(f).jqGrid("setRowData",d,j),C(c).attr("editable","0"),t=0;t<f.p.savedRow.length;t++)if(String(f.p.savedRow[t].id)===String(d)){s=t;break}C(f).triggerHandler("jqGridInlineAfterSaveRow",[d,e,j,p]),C.jgrid.isFunction(p.aftersavefunc)&&p.aftersavefunc.call(f,d,e,j,p),0<=s&&f.p.savedRow.splice(s,1),g=!0,C(c).removeClass("jqgrid-new-row").off("keydown")}else
C(f).triggerHandler("jqGridInlineErrorSaveRow",[d,e,i,null,p]),C.jgrid.isFunction(p.errorfunc)&&p.errorfunc.call(f,d,e,i,null),!0===p.restoreAfterError&&C(f).jqGrid("restoreRow",d,p)}},error:function(e,i,t){if(C("#lui_"+C.jgrid.jqID(f.p.id)).hide(),C(f).triggerHandler("jqGridInlineErrorSaveRow",[d,e,i,t,p]),C.jgrid.isFunction(p.errorfunc))p.errorfunc.call(f,d,e,i,t);else{i=e.responseText||e.statusText;try{C.jgrid.info_dialog(I.errcap,'<div class="'+h+'">'+i+"</div>",G.bClose,{buttonalign:"right",styleUI:f.p.styleUI})}catch(e){alert(i)}}!0===p.restoreAfterError&&C(f).jqGrid("restoreRow",d,p)}},C.jgrid.ajaxOptions,f.p.ajaxRowOptions||{}))}return g}},restoreRow:function(n,e){var
i=C.makeArray(arguments).slice(1),o={};return"object"===C.jgrid.type(i[0])?o=i[0]:C.jgrid.isFunction(e)&&(o.afterrestorefunc=e),o=C.extend(!0,{},C.jgrid.inlineEdit,o),this.each(function(){var
e,i,t=this,r=-1,a={};if(t.grid&&!1!==(e=C(t).jqGrid("getInd",n,!0))){var
d=C.jgrid.isFunction(o.beforeCancelRow)?o.beforeCancelRow.call(t,o,n):void
0;if(d=void
0===d?!0:d){for(i=0;i<t.p.savedRow.length;i++)if(String(t.p.savedRow[i].id)===String(n)){r=i;break}if(0<=r){if(C.jgrid.isFunction(C.fn.datepicker))try{C("input.hasDatepicker","#"+C.jgrid.jqID(e.id)).datepicker("hide")}catch(e){}C.each(t.p.colModel,function(){t.p.savedRow[r].hasOwnProperty(this.name)&&(a[this.name]=t.p.savedRow[r][this.name])}),C(t).jqGrid("setRowData",n,a),C(e).attr("editable","0").off("keydown"),t.p.savedRow.splice(r,1),C("#"+C.jgrid.jqID(n),"#"+C.jgrid.jqID(t.p.id)).hasClass("jqgrid-new-row")&&setTimeout(function(){C(t).jqGrid("delRowData",n),C(t).jqGrid("showAddEditButtons")},0)}C(t).triggerHandler("jqGridInlineAfterRestoreRow",[n]),C.jgrid.isFunction(o.afterrestorefunc)&&o.afterrestorefunc.call(t,n)}}})},addRow:function(r){return r=C.extend(!0,{rowID:null,initdata:{},position:"first",useDefValues:!0,useFormatter:!1,addRowParams:{extraparam:{}}},r||{}),this.each(function(){var
i,e,t;this.grid&&((i=this).p.beforeAction=!0,(e=void
0===(e=C.jgrid.isFunction(r.beforeAddRow)?r.beforeAddRow.call(i,r.addRowParams):void
0)?!0:e)?(r.rowID=C.jgrid.isFunction(r.rowID)?r.rowID.call(i,r):null!=r.rowID?r.rowID:C.jgrid.randId(),!0===r.useDefValues&&C(i.p.colModel).each(function(){var
e;this.editoptions&&this.editoptions.defaultValue&&(e=this.editoptions.defaultValue,e=C.jgrid.isFunction(e)?e.call(i):e,r.initdata[this.name]=e)}),C(i).jqGrid("addRowData",r.rowID,r.initdata,r.position),r.rowID=i.p.idPrefix+r.rowID,C("#"+C.jgrid.jqID(r.rowID),"#"+C.jgrid.jqID(i.p.id)).addClass("jqgrid-new-row"),r.useFormatter?C("#"+C.jgrid.jqID(r.rowID)+" .ui-inline-edit","#"+C.jgrid.jqID(i.p.id)).click():(t=(e=i.p.prmNames).oper,r.addRowParams.extraparam[t]=e.addoper,C(i).jqGrid("editRow",r.rowID,r.addRowParams),C(i).jqGrid("setSelection",r.rowID))):i.p.beforeAction=!1)})},inlineNav:function(d,n){var
o=this[0],s=C.jgrid.getRegional(o,"nav"),e=C.jgrid.styleUI[o.p.styleUI].inlinedit;return n=C.extend(!0,{edit:!0,editicon:e.icon_edit_nav,add:!0,addicon:e.icon_add_nav,save:!0,saveicon:e.icon_save_nav,cancel:!0,cancelicon:e.icon_cancel_nav,addParams:{addRowParams:{extraparam:{}}},editParams:{},restoreAfterSelect:!0,saveAfterSelect:!1},s,n||{}),this.each(function(){if(this.grid&&!this.p.inlineNav){var
a=C.jgrid.jqID(o.p.id),i=C.jgrid.trim(C(o).jqGrid("getStyleUI",o.p.styleUI+".common","disabled",!0));if(o.p.navGrid||C(o).jqGrid("navGrid",d,{refresh:!1,edit:!1,add:!1,del:!1,search:!1,view:!1}),C(o).data("inlineNav")||C(o).data("inlineNav",n),o.p.force_regional&&(n=C.extend(n,s)),(o.p.inlineNav=!0)===n.addParams.useFormatter)for(var
e,t=o.p.colModel,r=0;r<t.length;r++)if(t[r].formatter&&"actions"===t[r].formatter){t[r].formatoptions&&(e=C.extend({keys:!1,onEdit:null,onSuccess:null,afterSave:null,onError:null,afterRestore:null,extraparam:{},url:null},t[r].formatoptions),n.addParams.addRowParams={keys:e.keys,oneditfunc:e.onEdit,successfunc:e.onSuccess,url:e.url,extraparam:e.extraparam,aftersavefunc:e.afterSave,errorfunc:e.onError,afterrestorefunc:e.afterRestore});break}n.add&&C(o).jqGrid("navButtonAdd",d,{caption:n.addtext,title:n.addtitle,buttonicon:n.addicon,id:o.p.id+"_iladd",internal:!0,onClickButton:function(){void
0===o.p.beforeAction&&(o.p.beforeAction=!0),C(o).jqGrid("addRow",n.addParams),!n.addParams.useFormatter&&o.p.beforeAction&&(C("#"+a+"_ilsave").removeClass(i),C("#"+a+"_ilcancel").removeClass(i),C("#"+a+"_iladd").addClass(i),C("#"+a+"_iledit").addClass(i))}}),n.edit&&C(o).jqGrid("navButtonAdd",d,{caption:n.edittext,title:n.edittitle,buttonicon:n.editicon,id:o.p.id+"_iledit",internal:!0,onClickButton:function(){var
e=C(o).jqGrid("getGridParam","selrow");e?(void
0===o.p.beforeAction&&(o.p.beforeAction=!0),C(o).jqGrid("editRow",e,n.editParams),o.p.beforeAction&&(C("#"+a+"_ilsave").removeClass(i),C("#"+a+"_ilcancel").removeClass(i),C("#"+a+"_iladd").addClass(i),C("#"+a+"_iledit").addClass(i))):(C.jgrid.viewModal("#alertmod_"+a,{gbox:"#gbox_"+a,jqm:!0}),C("#jqg_alrt").focus())}}),n.save&&(C(o).jqGrid("navButtonAdd",d,{caption:n.savetext||"",title:n.savetitle||"Save row",buttonicon:n.saveicon,id:o.p.id+"_ilsave",internal:!0,onClickButton:function(){var
e,i,t,r=o.p.savedRow[0].id;r?(i=(e=o.p.prmNames).oper,t=n.editParams,C("#"+C.jgrid.jqID(r),"#"+a).hasClass("jqgrid-new-row")?(n.addParams.addRowParams.extraparam[i]=e.addoper,t=n.addParams.addRowParams):(n.editParams.extraparam||(n.editParams.extraparam={}),n.editParams.extraparam[i]=e.editoper),C(o).jqGrid("saveRow",r,t)&&C(o).jqGrid("showAddEditButtons")):(C.jgrid.viewModal("#alertmod_"+a,{gbox:"#gbox_"+a,jqm:!0}),C("#jqg_alrt").focus())}}),C("#"+a+"_ilsave").addClass(i)),n.cancel&&(C(o).jqGrid("navButtonAdd",d,{caption:n.canceltext||"",title:n.canceltitle||"Cancel row editing",buttonicon:n.cancelicon,id:o.p.id+"_ilcancel",internal:!0,onClickButton:function(){var
e=o.p.savedRow[0].id,i=n.editParams;e?(C("#"+C.jgrid.jqID(e),"#"+a).hasClass("jqgrid-new-row")&&(i=n.addParams.addRowParams),C(o).jqGrid("restoreRow",e,i),C(o).jqGrid("showAddEditButtons")):(C.jgrid.viewModal("#alertmod",{gbox:"#gbox_"+a,jqm:!0}),C("#jqg_alrt").focus())}}),C("#"+a+"_ilcancel").addClass(i)),!0!==n.restoreAfterSelect&&!0!==n.saveAfterSelect||C(o).on("jqGridBeforeSelectRow.inlineNav",function(e,i){0<o.p.savedRow.length&&!0===o.p.inlineNav&&i!==o.p.selrow&&null!==o.p.selrow&&(i=!0,o.p.selrow===n.addParams.rowID?C(o).jqGrid("delRowData",o.p.selrow):!0===n.restoreAfterSelect?C(o).jqGrid("restoreRow",o.p.selrow,n.editParams):i=C(o).jqGrid("saveRow",o.p.selrow,n.editParams),i)&&C(o).jqGrid("showAddEditButtons")})}})},showAddEditButtons:function(){return this.each(function(){var
e,i;this.grid&&(e=C.jgrid.jqID(this.p.id),i=C.jgrid.trim(C(this).jqGrid("getStyleUI",this.p.styleUI+".common","disabled",!0)),C("#"+e+"_ilsave").addClass(i),C("#"+e+"_ilcancel").addClass(i),C("#"+e+"_iladd").removeClass(i),C("#"+e+"_iledit").removeClass(i))})},showSaveCancelButtons:function(){return this.each(function(){var
e,i;this.grid&&(e=C.jgrid.jqID(this.p.id),i=C.jgrid.trim(C(this).jqGrid("getStyleUI",this.p.styleUI+".common","disabled",!0)),C("#"+e+"_ilsave").removeClass(i),C("#"+e+"_ilcancel").removeClass(i),C("#"+e+"_iladd").addClass(i),C("#"+e+"_iledit").addClass(i))})}})});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.base","jquery-ui/dialog","jquery-ui/draggable","jquery-ui/droppable","jquery-ui/resizable","jquery-ui/sortable","./addons/ui.multiselect"],e):e(jQuery)}(function(b){"use strict";var
s;b.jgrid.msie()&&8===b.jgrid.msiever()&&(b.expr[":"].hidden=function(e){return 0===e.offsetWidth||0===e.offsetHeight||"none"===e.style.display}),b.jgrid._multiselect=!1,b.ui&&b.ui.multiselect&&(b.ui.multiselect.prototype._setSelected&&(s=b.ui.multiselect.prototype._setSelected,b.ui.multiselect.prototype._setSelected=function(e,t){var
i,e=s.call(this,e,t);return t&&this.selectedList&&(i=this.element,this.selectedList.find("li").each(function(){b(this).data("optionLink")&&b(this).data("optionLink").remove().appendTo(i)})),e}),b.ui.multiselect.prototype.destroy&&(b.ui.multiselect.prototype.destroy=function(){this.element.show(),this.container.remove(),(void
0===b.Widget?b.widget:b.Widget).prototype.destroy.apply(this,arguments)}),b.jgrid._multiselect=!0),b.jgrid.extend({sortableColumns:function(d){return this.each(function(){var
r=this,e=b.jgrid.jqID(r.p.id),t=!1;function
i(){r.p.disableClick=!0,r.p.frozenColumns&&(b(r).jqGrid("destroyFrozenColumns"),t=!0)}function
s(){setTimeout(function(){r.p.disableClick=!1,t&&(b(r).jqGrid("setFrozenColumns"),t=!1)},50)}var
a,o,e={tolerance:"pointer",axis:"x",scrollSensitivity:"1",items:">th:not(:has(#jqgh_"+e+"_cb,#jqgh_"+e+"_rn,#jqgh_"+e+"_subgrid),:hidden)",cancel:".sortable-disabled",placeholder:{element:function(e){return b(document.createElement(e[0].nodeName)).addClass(e[0].className+" ui-sortable-placeholder ui-state-highlight").removeClass("ui-sortable-helper")[0]},update:function(e,t){t.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),t.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10))}},update:function(e,t){var
t=b(t.item).parent(),t=b(">th",t),i=r.p.colModel,s={},a=r.p.id+"_",o=(b.each(i,function(e){s[this.name]=e}),[]);t.each(function(){var
e=b(">div",this).get(0).id.replace(/^jqgh_/,"").replace(a,"");s.hasOwnProperty(e)&&o.push(s[e])}),b(r).jqGrid("remapColumns",o,!0,!0),b.jgrid.isFunction(r.p.sortable.update)&&r.p.sortable.update(o)}},e=(r.p.sortable.options?b.extend(e,r.p.sortable.options):b.jgrid.isFunction(r.p.sortable)&&(r.p.sortable={update:r.p.sortable}),e.start?(a=e.start,e.start=function(e,t){i(),a.call(this,e,t)}):e.start=i,e.stop?(o=e.stop,e.stop=function(e,t){s(),o.call(this,e,t)}):e.stop=s,r.p.sortable.exclude&&(e.items+=":not("+r.p.sortable.exclude+")"),d.sortable(e)),e=e.data("sortable")||e.data("uiSortable");null!=e&&(e.data("sortable").floating=!0)})},columnChooser:function(t){var
i,s,a=this,r={},o=[],e=a.jqGrid("getGridParam","colModel"),d=b.extend([],a.jqGrid("getGridParam","colNames")),n=function(e){return b.ui.multiselect.prototype&&e.data(b.ui.multiselect.prototype.widgetFullName||b.ui.multiselect.prototype.widgetName)||e.data("ui-multiselect")||e.data("multiselect")},l=b.jgrid.getRegional(this[0],"col");if(!b("#colchooser_"+b.jgrid.jqID(a[0].p.id)).length){if(i=b('<div id="colchooser_'+a[0].p.id+'" style="position:relative;overflow:hidden"><div><select multiple="multiple"></select></div></div>'),s=b("select",i),t=b.extend({width:400,height:240,classname:null,groupHeaders:!1,done:function(e){e&&a.jqGrid("remapColumns",e,!0)},msel:"multiselect",dlog:"dialog",dialog_opts:{minWidth:470,dialogClass:"ui-jqdialog"},dlog_opts:function(e){var
t={};return t[e.bSubmit]=function(){e.apply_perm(),e.cleanup(!1)},t[e.bCancel]=function(){e.cleanup(!0)},b.extend(!0,{buttons:t,close:function(){e.cleanup(!0)},modal:e.modal||!1,resizable:e.resizable||!0,width:e.width+70,resize:f},e.dialog_opts||{})},apply_perm:function(){var
o=[];b("option",s).each(function(){b(this).is(":selected")?a.jqGrid("showCol",e[this.value].name):a.jqGrid("hideCol",e[this.value].name)}),b("option[selected]",s).each(function(){this.selected&&o.push(parseInt(this.value,10))}),b.each(o,function(){delete
r[e[parseInt(this,10)].name]}),b.each(r,function(){var
e,t,i,s,a=parseInt(this,10);e=o,t=a=a,o=0<=a?(s=(i=e.slice()).splice(a,Math.max(e.length-a,a)),i[a=a>e.length?e.length:a]=t,i.concat(s)):e}),t.done&&t.done.call(a,o),a.jqGrid("setGridWidth",a[0].p.width,a[0].p.shrinkToFit)},cleanup:function(e){m(t.dlog,i,"destroy"),m(t.msel,s,"destroy"),i.remove(),e&&t.done&&t.done.call(a)},msel_opts:{dividerLocation:.5}},l,t||{}),b.ui&&b.ui.multiselect&&b.ui.multiselect.defaults){if(!b.jgrid._multiselect)return void
alert("Multiselect plugin loaded after jqGrid. Please load the plugin before the jqGrid!");t.msel_opts=b.extend(b.ui.multiselect.defaults,t.msel_opts)}if(a.jqGrid("isGroupHeaderOn")&&t.groupHeaders)for(var
l=a[0].p.groupHeader.length,c=a[0].p.groupHeader[l-1],u=0;u<d.length;u++){var
p=b.jgrid.inColumnHeader(e[u].name,c.groupHeaders);if(0<=p){d[u]=c.groupHeaders[p].titleText+"::"+d[u];for(var
h=1;h<=c.groupHeaders[p].numberOfColumns-1;h++)d[u+h]=c.groupHeaders[p].titleText+"::"+d[u+h];u=u+c.groupHeaders[p].numberOfColumns-1}}t.caption&&i.attr("title",t.caption),t.classname&&(i.addClass(t.classname),s.addClass(t.classname)),t.width&&(b(">div",i).css({width:t.width,margin:"0 auto"}),s.css("width",t.width)),t.height&&(b(">div",i).css("height",t.height),s.css("height",t.height-10)),s.empty(),b.each(e,function(e){r[this.name]=e,this.hidedlg?this.hidden||o.push(e):s.append("<option value='"+e+"' "+(this.hidden?"":"selected='selected'")+">"+b.jgrid.stripHtml(d[e])+"</option>")}),l=b.jgrid.isFunction(t.dlog_opts)?t.dlog_opts.call(a,t):t.dlog_opts,m(t.dlog,i,l),l=b.jgrid.isFunction(t.msel_opts)?t.msel_opts.call(a,t):t.msel_opts,m(t.msel,s,l);var
l=b("#colchooser_"+b.jgrid.jqID(a[0].p.id)),g=b(".ui-jqgrid").css("font-size")||"11px";l.parent().css("font-size",g),l.css({margin:"auto"}),l.find(">div").css({width:"100%",height:"100%",margin:"auto"}),(g=n(s)).container.css({width:"100%",height:"100%",margin:"auto"}),g.selectedContainer.css({width:100*g.options.dividerLocation+"%",height:"100%",margin:"auto",boxSizing:"border-box"}),g.availableContainer.css({width:100-100*g.options.dividerLocation+"%",height:"100%",margin:"auto",boxSizing:"border-box"}),g.selectedList.css("height","auto"),g.availableList.css("height","auto"),l=Math.max(g.selectedList.height(),g.availableList.height()),l=Math.min(l,b(window).height()),g.selectedList.css("height",l),g.availableList.css("height",l),f()}function
m(e,t){e&&("string"==typeof
e?b.fn[e]&&b.fn[e].apply(t,b.makeArray(arguments).slice(2)):b.jgrid.isFunction(e)&&e.apply(t,b.makeArray(arguments).slice(2)))}function
f(){var
e=n(s),t=e.container.closest(".ui-dialog-content");0<t.length&&"object"==typeof
t[0].style?t[0].style.width="":t.css("width",""),e.selectedList.height(Math.max(e.selectedContainer.height()-e.selectedActions.outerHeight()-1,1)),e.availableList.height(Math.max(e.availableContainer.height()-e.availableActions.outerHeight()-1,1))}},sortableRows:function(a){return this.each(function(){var
s=this;s.grid&&!s.p.treeGrid&&b.fn.sortable&&((a=b.extend({cursor:"move",axis:"y",items:" > .jqgrow"},a||{})).start&&b.jgrid.isFunction(a.start)?(a._start_=a.start,delete
a.start):a._start_=!1,a.update&&b.jgrid.isFunction(a.update)?(a._update_=a.update,delete
a.update):a._update_=!1,a.start=function(e,t){if(b(t.item).css("border-width","0"),b("td",t.item).each(function(e){this.style.width=s.grid.cols[e].style.width}),s.p.subGrid){var
i=b(t.item).attr("id");try{b(s).jqGrid("collapseSubGridRow",i)}catch(e){}}a._start_&&a._start_.apply(this,[e,t])},a.update=function(e,t){b(t.item).css("border-width",""),!0===s.p.rownumbers&&b("td.jqgrid-rownum",s.rows).each(function(e){b(this).html(e+1+(parseInt(s.p.page,10)-1)*parseInt(s.p.rowNum,10))}),a._update_&&a._update_.apply(this,[e,t])},b(s).find("tbody").first().sortable(a),b("tbody",s).first().find(" > .jqgrow").disableSelection())})},gridDnD:function(s){return this.each(function(){var
e,t,o=this;if(o.grid&&!o.p.treeGrid&&b.fn.draggable&&b.fn.droppable){var
h;if(void
0===b("#jqgrid_dnd")[0]&&b("body").append("<table id='jqgrid_dnd' class='ui-jqgrid-dnd'></table>"),"string"==typeof
s&&"updateDnD"===s&&!0===o.p.jqgdnd)i();else
if((s=b.extend({drag:function(a){return b.extend({start:function(e,t){var
i,s;if(o.p.subGrid){s=b(t.helper).attr("id");try{b(o).jqGrid("collapseSubGridRow",s)}catch(e){}}for(i=0;i<b.data(o,"dnd").connectWith.length;i++)0===b(b.data(o,"dnd").connectWith[i]).jqGrid("getGridParam","reccount")&&b(b.data(o,"dnd").connectWith[i]).jqGrid("addRowData","jqg_empty_row",{});t.helper.addClass("ui-state-highlight"),b("td",t.helper).each(function(e){this.style.width=o.grid.headers[e].width+"px"}),a.onstart&&b.jgrid.isFunction(a.onstart)&&a.onstart.call(b(o),e,t)},stop:function(e,t){var
i,s;for(t.helper.dropped&&!a.dragcopy&&(void
0===(s=b(t.helper).attr("id"))&&(s=b(this).attr("id")),b(o).jqGrid("delRowData",s)),i=0;i<b.data(o,"dnd").connectWith.length;i++)b(b.data(o,"dnd").connectWith[i]).jqGrid("delRowData","jqg_empty_row");a.onstop&&b.jgrid.isFunction(a.onstop)&&a.onstop.call(b(o),e,t)}},a.drag_opts||{})},drop:function(p){return b.extend({accept:function(e){if(!b(e).hasClass("jqgrow"))return e;h=b(e).closest("table.ui-jqgrid-btable");var
t,e=b(this).find("table.ui-jqgrid-btable").first()[0];return 0<h.length&&void
0!==b.data(h[0],"dnd")&&(t=b.data(h[0],"dnd").connectWith,-1!==b.inArray("#"+b.jgrid.jqID(e.id),t))},drop:function(e,t){if(b(t.draggable).hasClass("jqgrow")){var
i,s,a=b(t.draggable).attr("id"),o=t.draggable.parent().parent().jqGrid("getRowData",a),r=[],a=b(this).find("table.ui-jqgrid-btable").first()[0];if(b.isPlainObject(o)&&(r=Object.keys(o)),!p.dropbyname){var
d,n,l={},c=0,u=b("#"+b.jgrid.jqID(a.id)).jqGrid("getGridParam","colModel");try{for(d=0;d<u.length;d++)"cb"!==(n=u[d].name)&&"rn"!==n&&"subgrid"!==n&&"sc"!==n&&(void
0!==r[c]&&(l[n]=o[r[c]]),c++);o=l}catch(e){}}t.helper.dropped=!0,b.data(h[0],"dnd").beforedrop&&b.jgrid.isFunction(b.data(h[0],"dnd").beforedrop)&&null!=(i=b.data(h[0],"dnd").beforedrop.call(a,e,t,o,b(h[0]),b(a)))&&"object"==typeof
i&&(o=i),t.helper.dropped&&(p.autoid&&(s=b.jgrid.isFunction(p.autoid)?p.autoid.call(a,o):(s=Math.ceil(1e3*Math.random()),p.autoidprefix+s)),b("#"+b.jgrid.jqID(a.id)).jqGrid("addRowData",s,o,p.droppos)),p.ondrop&&b.jgrid.isFunction(p.ondrop)&&p.ondrop.call(a,e,t,o)}}},p.drop_opts||{})},onstart:null,onstop:null,beforedrop:null,ondrop:null,drop_opts:{activeClass:"ui-state-active",hoverClass:"ui-state-hover",tolerance:"intersect"},drag_opts:{revert:"invalid",helper:"clone",cursor:"move",appendTo:"#jqgrid_dnd",zIndex:5e3},dragcopy:!1,dropbyname:!1,droppos:"first",autoid:!0,autoidprefix:"dnd_"},s||{})).connectWith)for(s.connectWith=s.connectWith.split(","),s.connectWith=b.map(s.connectWith,function(e){return b.jgrid.trim(e)}),b.data(o,"dnd",s),0===o.p.reccount||o.p.jqgdnd||i(),o.p.jqgdnd=!0,e=0;e<s.connectWith.length;e++)t=s.connectWith[e],b(t).closest(".ui-jqgrid-bdiv").droppable(b.jgrid.isFunction(s.drop)?s.drop.call(b(o),s):s.drop)}function
i(){var
e=b.data(o,"dnd");b("tr.jqgrow:not(.ui-draggable)",o).draggable(b.jgrid.isFunction(e.drag)?e.drag.call(b(o),e):e.drag)}})},gridResize:function(o){return this.each(function(){var
i,e,t,s=this,a=b.jgrid.jqID(s.p.id);s.grid&&b.fn.resizable&&((o=b.extend({},{resizeclass:"ui-resizable-icon"},o||{})).alsoResize?(o._alsoResize_=o.alsoResize,delete
o.alsoResize):o._alsoResize_=!1,o.stop&&b.jgrid.isFunction(o.stop)?(o._stop_=o.stop,delete
o.stop):o._stop_=!1,e=o.resizeclass,"jQueryUI"!==s.p.styleUI&&(o.handles?o.handles.se?e+=" "+o.handles.se.replace(".",""):o.handles.se="."+e:(o.handles={},t=e.split(" "),o.handles.se="."+t[0]),e+=" ui-resizable-se ui-resizable-handle",b("#gbox_"+a).append('<span class="'+e+'"></span>')),o.stop=function(e,t){b(s).jqGrid("setGridParam",{height:b("#gview_"+a+" .ui-jqgrid-bdiv").height()}),b(s).jqGrid("setGridWidth",t.size.width,o.shrinkToFit),o._stop_&&o._stop_.call(s,e,t),s.p.caption&&b("#gbox_"+a).css({height:"auto"}),s.p.frozenColumns&&(i&&clearTimeout(i),i=setTimeout(function(){i&&clearTimeout(i),b("#"+a).jqGrid("destroyFrozenColumns"),b("#"+a).jqGrid("setFrozenColumns")}))},o._alsoResize_?o.alsoResize="#gview_"+a+" .ui-jqgrid-bdiv,"+o._alsoResize_:o.alsoResize=b(".ui-jqgrid-bdiv","#gview_"+a),delete
o._alsoResize_,b("#gbox_"+a).resizable(o))})}})});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.base","./grid.grouping"],e):e(jQuery)}(function(Q){"use strict";Q.assocArraySize=function(e){var
r,o=0;for(r
in
e)e.hasOwnProperty(r)&&o++;return o},Q.jgrid.extend({pivotSetup:function(F,e){var
H=[],A=[],k=[],G=[],M=[],z={grouping:!0,groupingView:{groupField:[],groupSummary:[],groupSummaryPos:[]}},V=[],q=Q.extend({rowTotals:!1,rowTotalsText:"Total",colTotals:!1,groupSummary:!0,groupSummaryPos:"header",frozenStaticCols:!1},e||{});return this.each(function(){var
d,f,p,e,r,c=this,o=F.length,t=0;function
i(e,r,o){e=function(e,r){var
o,t,i,n=[];if(!this||"function"!=typeof
e||e
instanceof
RegExp)throw new
TypeError;for(i=this.length,o=0;o<i;o++)if(this.hasOwnProperty(o)&&(t=this[o],e.call(r,t,o,this))){n.push(t);break}return n}.call(e,r,o);return 0<e.length?e[0]:null}function
n(e,r){var
o,t=0,i=!0;for(o
in
e)if(e.hasOwnProperty(o)){if(e[o]!=this[t]){i=!1;break}if(++t>=this.length)break}return i&&(b=r),i}function
a(e,r,o,t){var
i,n,a,l,s=r.length,g="",u=[],m=1;for(Array.isArray(o)?(a=o.length,u=o):(a=1,u[0]=o),M=[],n=(G=[]).root=0;n<a;n++){for(var
d,f=[],p=0;p<s;p++){if(l="string"==typeof
r[p].aggregator?r[p].aggregator:"cust",null==o)d=i=Q.jgrid.trim(r[p].member)+"_"+l,u[0]=r[p].label||l+" "+Q.jgrid.trim(r[p].member);else{d=o[n].replace(/\s+/g,"");try{i=1===s?g+d:g+d+"_"+l+"_"+String(p)}catch(e){}u[n]=o[n]}i=isNaN(parseInt(i,10))?i:i+" ","avg"===r[p].aggregator&&(l=-1===b?A.length+"_"+i:b+"_"+i,h[l]?h[l]++:h[l]=1,m=h[l]),t[i]=f[i]=function(e,r,o,t,i){var
n;if(Q.jgrid.isFunction(e))n=e.call(c,r,o,t);else
switch(e){case"sum":n=Q.jgrid.floatNum(r)+Q.jgrid.floatNum(t[o]);break;case"count":""!==r&&null!=r||(r=0),n=t.hasOwnProperty(o)?r+1:0;break;case"min":n=""===r||null==r?Q.jgrid.floatNum(t[o]):Math.min(Q.jgrid.floatNum(r),Q.jgrid.floatNum(t[o]));break;case"max":n=""===r||null==r?Q.jgrid.floatNum(t[o]):Math.max(Q.jgrid.floatNum(r),Q.jgrid.floatNum(t[o]));break;case"avg":n=(Q.jgrid.floatNum(r)*(i-1)+Q.jgrid.floatNum(t[o]))/i}return n}(r[p].aggregator,t[i],r[p].member,e,m)}g+=o&&null!=o[n]?o[n].replace(/\s+/g,""):"",G[i]=f,M[i]=u[n]}return t}if(q.rowTotals&&0<q.yDimension.length&&(e=q.yDimension[0].dataName,q.yDimension.splice(0,0,{dataName:e}),q.yDimension[0].converter=function(){return"_r_Totals"}),d=Array.isArray(q.xDimension)?q.xDimension.length:0,f=q.yDimension.length,p=Array.isArray(q.aggregates)?q.aggregates.length:0,0===d||0===p)throw"xDimension or aggregates optiona are not set!";for(y=0;y<d;y++)r={name:q.xDimension[y].dataName,frozen:q.frozenStaticCols},null==q.xDimension[y].isGroupField&&(q.xDimension[y].isGroupField=!0),r=Q.extend(!0,r,q.xDimension[y]),H.push(r);for(var
l=d-1,s={},h=[];t<o;){for(var
g=F[t],u=[],m=[],v={},y=0;u[y]=Q.jgrid.trim(g[q.xDimension[y].dataName]),v[q.xDimension[y].dataName]=u[y],++y<d;);var
x,j=0,b=-1;if(x=i(A,n,u)){if(0<=b){if(j=0,1<=f){for(j=0;j<f;j++)m[j]=Q.jgrid.trim(g[q.yDimension[j].dataName]),q.yDimension[j].converter&&Q.jgrid.isFunction(q.yDimension[j].converter)&&(m[j]=q.yDimension[j].converter.call(this,m[j],u,m));x=a(g,q.aggregates,m,x)}else
0===f&&(x=a(g,q.aggregates,null,x));A[b]=x}}else{if(j=0,1<=f){for(j=0;j<f;j++)m[j]=Q.jgrid.trim(g[q.yDimension[j].dataName]),q.yDimension[j].converter&&Q.jgrid.isFunction(q.yDimension[j].converter)&&(m[j]=q.yDimension[j].converter.call(this,m[j],u,m));v=a(g,q.aggregates,m,v)}else
0===f&&(v=a(g,q.aggregates,null,v));A.push(v)}var
w,D=0,N=null,O=null;for(w
in
G)if(G.hasOwnProperty(w)){if(0===D)N=(s=s.children&&void
0!==s.children?s:{text:w,level:0,children:[],label:w}).children;else{for(O=null,y=0;y<N.length;y++)if(N[y].text===w){O=N[y];break}N=(O||(N.push({children:[],text:w,level:D,fields:G[w],label:M[w]}),N[N.length-1])).children}D++}t++}var
S,h=null,T=[],C=H.length,P=C;if(0<f&&(V[f-1]={useColSpanStyle:!1,groupHeaders:[]}),!function
e(r){var
o,t,i,n,a;for(i
in
r)if(r.hasOwnProperty(i)){if("object"!=typeof
r[i]){if("level"===i){if(void
0===T[r.level]&&(T[r.level]="",0<r.level)&&-1===r.text.indexOf("_r_Totals")&&(V[r.level-1]={useColSpanStyle:!1,groupHeaders:[]}),T[r.level]!==r.text&&r.children.length&&-1===r.text.indexOf("_r_Totals")&&0<r.level){V[r.level-1].groupHeaders.push({titleText:r.label,numberOfColumns:0});var
l=V[r.level-1].groupHeaders.length-1,s=0==l?P:C;if(r.level-1==(q.rowTotals?1:0)&&0<l){for(var
g=0,u=0;u<l;u++)g+=V[r.level-1].groupHeaders[u].numberOfColumns;g&&(s=g+d)}H[s]&&(V[r.level-1].groupHeaders[l].startColumnName=H[s].name,V[r.level-1].groupHeaders[l].numberOfColumns=H.length-s),C=H.length}T[r.level]=r.text}if(r.level===f&&"level"===i&&0<f)if(1<p){var
m=1;for(o
in
r.fields)r.fields.hasOwnProperty(o)&&(1===m&&V[f-1].groupHeaders.push({startColumnName:o,numberOfColumns:1,titleText:r.label||r.text}),m++);V[f-1].groupHeaders[V[f-1].groupHeaders.length-1].numberOfColumns=m-1}else
V.splice(f-1,1)}if(null!=r[i]&&"object"==typeof
r[i]&&e(r[i]),"level"===i&&0<r.level&&(r.level===(0===f?r.level:f)||-1!==T[r.level].indexOf("_r_Totals")))for(o
in
t=0,r.fields)if(r.fields.hasOwnProperty(o)){for(n
in
a={},q.aggregates[t])if(q.aggregates[t].hasOwnProperty(n))switch(n){case"member":case"label":case"aggregator":break;default:a[n]=q.aggregates[t][n]}1<p?(a.name=o,a.label=q.aggregates[t].label||r.label):(a.name=r.text,a.label="_r_Totals"===r.text?q.rowTotalsText:r.label),H.push(a),t++}}}(s),q.colTotals)for(var
_=A.length;_--;)for(y=d;y<H.length;y++)S=H[y].name,k[S]?k[S]+=Q.jgrid.floatNum(A[_][S]):k[S]=Q.jgrid.floatNum(A[_][S]);if(0<l)for(y=0;y<l;y++)H[y].isGroupField&&(z.groupingView.groupField.push(H[y].name),z.groupingView.groupSummary.push(q.groupSummary),z.groupingView.groupSummaryPos.push(q.groupSummaryPos));else
z.grouping=!1;z.sortname=H[l].name,z.groupingView.hideFirstGroupCol=!0}),{colModel:H,rows:A,groupOptions:z,groupHeaders:V,summary:k}},jqPivot:function(o,g,u,t){return this.each(function(){var
s=this,e=u.regional||"en";function
r(e){Q.jgrid.isFunction(g.onInitPivot)&&g.onInitPivot.call(s),Array.isArray(e)||(e=[]);var
r,o,t,i,n=jQuery(s).jqGrid("pivotSetup",e,g),e=0<Q.assocArraySize(n.summary),a=Q.jgrid.from.call(s,n.rows);for(g.ignoreCase&&(a=a.ignoreCase()),r=0;r<n.groupOptions.groupingView.groupField.length;r++)o=g.xDimension[r].sortorder||"asc",t=g.xDimension[r].sorttype||"text",a.orderBy(n.groupOptions.groupingView.groupField[r],o,t,"",t);if(i=g.xDimension.length,u.sortname){for(o=u.sortorder||"asc",t="text",r=0;r<i;r++)if(g.xDimension[r].dataName===u.sortname){t=g.xDimension[r].sorttype||"text";break}a.orderBy(u.sortname,o,t,"",t)}else
n.groupOptions.sortname&&i&&(o=g.xDimension[i-1].sortorder||"asc",t=g.xDimension[i-1].sorttype||"text",a.orderBy(n.groupOptions.sortname,o,t,"",t));jQuery(s).jqGrid(Q.extend(!0,{datastr:Q.extend(a.select(),e?{userdata:n.summary}:{}),datatype:"jsonstring",footerrow:e,userDataOnFooter:e,colModel:n.colModel,viewrecords:!0,formatFooterData:!0===g.colTotals,sortname:g.xDimension[0].dataName},n.groupOptions,u||{}));var
l=n.groupHeaders;if(l.length)for(r=0;r<l.length;r++)l[r]&&l[r].groupHeaders.length&&jQuery(s).jqGrid("setGroupHeaders",l[r]);g.frozenStaticCols&&jQuery(s).jqGrid("setFrozenColumns"),Q.jgrid.isFunction(g.onCompletePivot)&&g.onCompletePivot.call(s),g.loadMsg&&Q(".loading_pivot").remove()}void
0===g.loadMsg&&(g.loadMsg=!0),g.loadMsg&&Q("<div class='loading_pivot ui-state-default ui-state-active row'>"+Q.jgrid.getRegional(s,"regional."+e+".defaults.loadtext")+"</div>").insertBefore(s).show(),"string"==typeof
o?Q.ajax(Q.extend({url:o,dataType:"json",success:function(e){r(Q.jgrid.getAccessor(e,t&&t.reader?t.reader:"rows"))}},t||{})):r(o)})}})});!function(i){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.base"],i):i(jQuery)}(function(j){"use strict";j.jgrid.extend({setSubGrid:function(){return this.each(function(){var
i,e,s=this,d=j.jgrid.styleUI[s.p.styleUI||"jQueryUI"].subgrid,d={plusicon:d.icon_plus,minusicon:d.icon_minus,openicon:d.icon_open,expandOnLoad:!1,selectOnExpand:!1,selectOnCollapse:!1,reloadOnExpand:!0};if(s.p.subGridOptions=j.extend(d,s.p.subGridOptions||{}),s.p.colNames.unshift(""),s.p.colModel.unshift({name:"subgrid",width:j.jgrid.cell_width?s.p.subGridWidth+s.p.cellLayout:s.p.subGridWidth,sortable:!1,resizable:!1,hidedlg:!0,search:!1,fixed:!0}),(i=s.p.subGridModel)[0])for(i[0].align=j.extend([],i[0].align||[]),e=0;e<i[0].name.length;e++)i[0].align[e]=i[0].align[e]||"left"})},addSubGridCell:function(i,e){var
s,d,r,t="";return this.each(function(){t=this.formatCol(i,e),d=this.p.id,s=this.p.subGridOptions.plusicon,r=j.jgrid.styleUI[this.p.styleUI||"jQueryUI"].common}),'<td role="gridcell" aria-describedby="'+d+'_subgrid" class="ui-sgcollapsed sgcollapsed" '+t+"><a style='cursor:pointer;' class='ui-sghref'><span class='"+r.icon_base+" "+s+"'></span></a></td>"},addSubGrid:function(m,t){return this.each(function(){var
u=this;if(u.grid){var
n,a,l,o,p,i,s,c=j.jgrid.styleUI[u.p.styleUI||"jQueryUI"].base,g=j.jgrid.styleUI[u.p.styleUI||"jQueryUI"].common,b=function(i,e,s){s=j("<td align='"+u.p.subGridModel[0].align[s]+"'></td>").html(e);j(i).append(s)},h=function(i,e){for(var
s,d,r=j("<table class='"+c.rowTable+" ui-common-table'><tbody></tbody></table>"),t=j("<tr></tr>"),n=0;n<u.p.subGridModel[0].name.length;n++)s=j("<th class='"+c.headerBox+" ui-th-subgrid ui-th-column ui-th-"+u.p.direction+"'></th>"),j(s).html(u.p.subGridModel[0].name[n]),j(s).width(u.p.subGridModel[0].width[n]),j(t).append(s);j(r).append(t),i&&(d=u.p.xmlReader.subgrid,j(d.root+" "+d.row,i).each(function(){if(t=j("<tr class='"+g.content+" ui-subtblcell'></tr>"),!0===d.repeatitems)j(d.cell,this).each(function(i){b(t,j(this).text()||"&#160;",i)});else{var
i=u.p.subGridModel[0].mapping||u.p.subGridModel[0].name;if(i)for(n=0;n<i.length;n++)b(t,j.jgrid.getXmlData(this,i[n])||"&#160;",n)}j(r).append(t)}));i=j(u.grid.bDiv).find("table").first().attr("id")+"_";return j("#"+j.jgrid.jqID(i+e)).append(r),u.grid.hDiv.loading=!1,j("#load_"+j.jgrid.jqID(u.p.id)).hide(),!1},f=function(i,e){for(var
s,d,r,t,n,a=j("<table class='"+c.rowTable+" ui-common-table'><tbody></tbody></table>"),l=j("<tr></tr>"),o=0;o<u.p.subGridModel[0].name.length;o++)s=j("<th class='"+c.headerBox+" ui-th-subgrid ui-th-column ui-th-"+u.p.direction+"'></th>"),j(s).html(u.p.subGridModel[0].name[o]),j(s).width(u.p.subGridModel[0].width[o]),j(l).append(s);if(j(a).append(l),i&&(t=u.p.jsonReader.subgrid,void
0!==(d=j.jgrid.getAccessor(i,t.root))))for(o=0;o<d.length;o++){if(r=d[o],l=j("<tr class='"+g.content+" ui-subtblcell'></tr>"),!0===t.repeatitems)for(t.cell&&(r=r[t.cell]),n=0;n<r.length;n++)b(l,r[n]||"&#160;",n);else{var
p=u.p.subGridModel[0].mapping||u.p.subGridModel[0].name;if(p.length)for(n=0;n<p.length;n++)b(l,j.jgrid.getAccessor(r,p[n])||"&#160;",n)}j(a).append(l)}i=j(u.grid.bDiv).find("table").first().attr("id")+"_";return j("#"+j.jgrid.jqID(i+e)).append(a),u.grid.hDiv.loading=!1,j("#load_"+j.jgrid.jqID(u.p.id)).hide(),!1},G=0,e=(j.each(u.p.colModel,function(){!0!==this.hidden&&"rn"!==this.name&&"cb"!==this.name&&"sc"!==this.name||G++}),u.rows.length),d=1,r=j.jgrid.isFunction(u.p.isHasSubGrid);for(void
0!==t&&0<t&&(e=(d=t)+1);d<e;)j(u.rows[d]).hasClass("jqgrow")&&(u.p.scroll&&j(u.rows[d].cells[m]).off("click"),i=null,!1===(i=r?u.p.isHasSubGrid.call(u,u.rows[d].id):i)?u.rows[d].cells[m].innerHTML="":j(u.rows[d].cells[m]).on("click",function(){var
i=j(this).parent("tr")[0];if(a=u.p.id,n=i.id,p=j("#"+a+"_"+n+"_expandedContent"),j(this).hasClass("sgcollapsed")){if(!1===(o=(o=!1!==(o=j(u).triggerHandler("jqGridSubGridBeforeExpand",[a+"_"+n,n]))&&"stop"!==o)&&j.jgrid.isFunction(u.p.subGridBeforeExpand)?u.p.subGridBeforeExpand.call(u,a+"_"+n,n):o))return!1;if(!0===u.p.subGridOptions.reloadOnExpand||!1===u.p.subGridOptions.reloadOnExpand&&!p.hasClass("ui-subgrid"))if(l=1<=m?"<td colspan='"+m+"'>&#160;</td>":"",j(i).after("<tr role='row' id='"+a+"_"+n+"_expandedContent' class='ui-subgrid ui-sg-expanded'>"+l+"<td class='"+g.content+" subgrid-cell'><span class='"+g.icon_base+" "+u.p.subGridOptions.openicon+"'></span></td><td colspan='"+parseInt(u.p.colNames.length-1-G,10)+"' class='"+g.content+" subgrid-data'><div id="+a+"_"+n+" class='tablediv'></div></td></tr>"),j(u).triggerHandler("jqGridSubGridRowExpanded",[a+"_"+n,n]),j.jgrid.isFunction(u.p.subGridRowExpanded))u.p.subGridRowExpanded.call(u,a+"_"+n,n);else{var
e,s,d=i,r=j(d).attr("id"),t={nd_:(new
Date).getTime()};if(t[u.p.prmNames.subgridid]=r,u.p.subGridModel[0]){if(u.p.subGridModel[0].params)for(s=0;s<u.p.subGridModel[0].params.length;s++)for(e=0;e<u.p.colModel.length;e++)u.p.colModel[e].name===u.p.subGridModel[0].params[s]&&(t[u.p.colModel[e].name]=j("td",d).eq(e).text().replace(/\&#160\;/gi,""));if(!u.grid.hDiv.loading)switch(u.grid.hDiv.loading=!0,j("#load_"+j.jgrid.jqID(u.p.id)).show(),u.p.subgridtype||(u.p.subgridtype=u.p.datatype),j.jgrid.isFunction(u.p.subgridtype)?u.p.subgridtype.call(u,t):u.p.subgridtype=u.p.subgridtype.toLowerCase(),u.p.subgridtype){case"xml":case"json":j.ajax(j.extend({type:u.p.mtype,url:j.jgrid.isFunction(u.p.subGridUrl)?u.p.subGridUrl.call(u,t):u.p.subGridUrl,dataType:u.p.subgridtype,data:j.jgrid.isFunction(u.p.serializeSubGridData)?u.p.serializeSubGridData.call(u,t):t,complete:function(i){"xml"===u.p.subgridtype?h(i.responseXML,r):f(j.jgrid.parse(i.responseText),r)}},j.jgrid.ajaxOptions,u.p.ajaxSubgridOptions||{}))}}}else
p.show().removeClass("ui-sg-collapsed").addClass("ui-sg-expanded");j(this).html("<a style='cursor:pointer;' class='ui-sghref'><span class='"+g.icon_base+" "+u.p.subGridOptions.minusicon+"'></span></a>").removeClass("sgcollapsed").addClass("sgexpanded"),u.p.subGridOptions.selectOnExpand&&j(u).jqGrid("setSelection",n)}else
if(j(this).hasClass("sgexpanded")){if(!1===(o=(o=!1!==(o=j(u).triggerHandler("jqGridSubGridRowColapsed",[a+"_"+n,n]))&&"stop"!==o)&&j.jgrid.isFunction(u.p.subGridRowColapsed)?u.p.subGridRowColapsed.call(u,a+"_"+n,n):o))return!1;!0===u.p.subGridOptions.reloadOnExpand?p.remove(".ui-subgrid"):p.hasClass("ui-subgrid")&&p.hide().addClass("ui-sg-collapsed").removeClass("ui-sg-expanded"),j(this).html("<a style='cursor:pointer;' class='ui-sghref'><span class='"+g.icon_base+" "+u.p.subGridOptions.plusicon+"'></span></a>").removeClass("sgexpanded").addClass("sgcollapsed"),u.p.subGridOptions.selectOnCollapse&&j(u).jqGrid("setSelection",n)}return!1})),d++;!0===u.p.subGridOptions.expandOnLoad&&(s=0,u.p.multiselect&&s++,u.p.rownumbers&&s++,j(u.rows).filter(".jqgrow").each(function(i,e){j(e.cells[s]).click()})),u.subGridXml=function(i,e){h(i,e)},u.subGridJson=function(i,e){f(i,e)}}})},expandSubGridRow:function(e){return this.each(function(){var
i;(this.grid||e)&&!0===this.p.subGrid&&(i=j(this).jqGrid("getInd",e,!0))&&(i=j("td.sgcollapsed",i)[0])&&j(i).trigger("click")})},collapseSubGridRow:function(e){return this.each(function(){var
i;(this.grid||e)&&!0===this.p.subGrid&&(i=j(this).jqGrid("getInd",e,!0))&&(i=j("td.sgexpanded",i)[0])&&j(i).trigger("click")})},toggleSubGridRow:function(s){return this.each(function(){var
i,e;(this.grid||s)&&!0===this.p.subGrid&&(i=j(this).jqGrid("getInd",s,!0))&&(e=(e=j("td.sgcollapsed",i)[0])||j("td.sgexpanded",i)[0])&&j(e).trigger("click")})}})});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.base"],e):e(jQuery)}(function(N){"use strict";N.jgrid.extend({setTreeNode:function(u,G){return this.each(function(){var
t=this;if(t.grid&&t.p.treeGrid){var
e,r,i,d,a,s=t.p.expColInd,l=t.p.treeReader.expanded_field,n=t.p.treeReader.leaf_field,p=t.p.treeReader.level_field,o=t.p.treeReader.icon_field,h=t.p.treeReader.loaded,f=N.jgrid.styleUI[t.p.styleUI||"jQueryUI"].common,c=u;for(N(t).triggerHandler("jqGridBeforeSetTreeNode",[c,G]),N.jgrid.isFunction(t.p.beforeSetTreeNode)&&t.p.beforeSetTreeNode.call(t,c,G);u<G;){var
g=N.jgrid.stripPref(t.p.idPrefix,t.rows[u].id),g=t.p._index[g],g=t.p.data[g];"nested"!==t.p.treeGridModel||g[n]||(i=parseInt(g[t.p.treeReader.left_field],10),e=parseInt(g[t.p.treeReader.right_field],10),g[n]=e===i+1?"true":"false",t.rows[u].cells[t.p._treeleafpos].innerHTML=g[n]),e=parseInt(g[p],10),i=0===t.p.tree_root_level?(r=e+1,e):(r=e)-1,d="<div class='tree-wrap tree-wrap-"+t.p.direction+"' style='width:"+18*r+"px;'>",d+="<div style='"+("rtl"===t.p.direction?"right:":"left:")+18*i+"px;' class='"+f.icon_base+" ",void
0!==g[h]&&("true"===g[h]||!0===g[h]?g[h]=!0:g[h]=!1),a="true"===g[n]||!0===g[n]?(d+=(void
0!==g[o]&&""!==g[o]?g[o]:t.p.treeIcons.leaf)+" tree-leaf treeclick",g[n]=!0,"leaf"):(g[n]=!1,""),g[l]=("true"===g[l]||!0===g[l])&&(g[h]||void
0===g[h]),!1===g[l]?d+=!0===g[n]?"'":t.p.treeIcons.plus+" tree-plus treeclick'":d+=!0===g[n]?"'":t.p.treeIcons.minus+" tree-minus treeclick'",d+="></div></div>",N(t.rows[u].cells[s]).wrapInner("<span class='cell-wrapper"+a+"'></span>").prepend(d),e===parseInt(t.p.tree_root_level,10)||N(t).jqGrid("isVisibleNode",g)||N(t.rows[u]).css("display","none"),N(t.rows[u].cells[s]).find("div.treeclick").on("click",function(e){e=e.target||e.srcElement,e=N.jgrid.stripPref(t.p.idPrefix,N(e,t.rows).closest("tr.jqgrow")[0].id),e=t.p._index[e];return t.p.data[e][n]||(t.p.data[e][l]?(N(t).jqGrid("collapseRow",t.p.data[e]),N(t).jqGrid("collapseNode",t.p.data[e])):(N(t).jqGrid("expandRow",t.p.data[e]),N(t).jqGrid("expandNode",t.p.data[e]))),!1}),!0===t.p.ExpandColClick&&N(t.rows[u].cells[s]).find("span.cell-wrapper").css("cursor","pointer").on("click",function(e){var
e=e.target||e.srcElement,e=N.jgrid.stripPref(t.p.idPrefix,N(e,t.rows).closest("tr.jqgrow")[0].id),r=t.p._index[e];return t.p.data[r][n]||(t.p.data[r][l]?(N(t).jqGrid("collapseRow",t.p.data[r]),N(t).jqGrid("collapseNode",t.p.data[r])):(N(t).jqGrid("expandRow",t.p.data[r]),N(t).jqGrid("expandNode",t.p.data[r]))),N(t).jqGrid("setSelection",e),!1}),u++}N(t).triggerHandler("jqGridAfterSetTreeNode",[c,G]),N.jgrid.isFunction(t.p.afterSetTreeNode)&&t.p.afterSetTreeNode.call(t,c,G)}})},setTreeGrid:function(){return this.each(function(){var
e,r,t,i,d=this,a=0,s=!1,l=[],n=N.jgrid.styleUI[d.p.styleUI||"jQueryUI"].treegrid;if(d.p.treeGrid){for(t
in
d.p.treedatatype||N.extend(d.p,{treedatatype:d.p.datatype}),d.p.loadonce&&(d.p.treedatatype="local"),d.p.subGrid=!1,d.p.altRows=!1,d.p.treeGrid_bigData||(d.p.pgbuttons=!1,d.p.pginput=!1,d.p.rowList=[]),d.p.gridview=!0,null!==d.p.rowTotal||d.p.treeGrid_bigData||(d.p.rowNum=1e4),d.p.multiselect=!1,d.p.expColInd=0,e=n.icon_plus,"jQueryUI"===d.p.styleUI&&(e+="rtl"===d.p.direction?"w":"e"),d.p.treeIcons=N.extend({plus:e,minus:n.icon_minus,leaf:n.icon_leaf},d.p.treeIcons||{}),"nested"===d.p.treeGridModel?d.p.treeReader=N.extend({level_field:"level",left_field:"lft",right_field:"rgt",leaf_field:"isLeaf",expanded_field:"expanded",loaded:"loaded",icon_field:"icon"},d.p.treeReader):"adjacency"===d.p.treeGridModel&&(d.p.treeReader=N.extend({level_field:"level",parent_id_field:"parent",leaf_field:"isLeaf",expanded_field:"expanded",loaded:"loaded",icon_field:"icon"},d.p.treeReader)),d.p.colModel)if(d.p.colModel.hasOwnProperty(t))for(i
in(r=d.p.colModel[t].name)!==d.p.ExpandColumn||s||(s=!0,d.p.expColInd=a),a++,r!==d.p.treeReader.level_field&&r!==d.p.treeReader.left_field&&r!==d.p.treeReader.right_field||(d.p.colModel[t].sorttype="integer"),d.p.treeReader)d.p.treeReader.hasOwnProperty(i)&&d.p.treeReader[i]===r&&l.push(r);N.each(d.p.treeReader,function(e,r){r&&-1===N.inArray(r,l)&&("leaf_field"===e&&(d.p._treeleafpos=a),a++,d.p.colNames.push(r),d.p.colModel.push({name:r,width:1,hidden:!0,sortable:!1,resizable:!1,hidedlg:!0,editable:!0,search:!1}))})}})},expandRow:function(s){this.each(function(){var
e,r,t,i,d,a=this;a.p.treeGrid_bigData||(e=a.p.lastpage),a.grid&&a.p.treeGrid&&(r=N(a).jqGrid("getNodeChildren",s),t=a.p.treeReader.expanded_field,i=s[a.p.localReader.id],!1===(d=(d=void
0===(d=N(a).triggerHandler("jqGridBeforeExpandTreeGridRow",[i,s,r]))?!0:d)&&N.jgrid.isFunction(a.p.beforeExpandTreeGridRow)?a.p.beforeExpandTreeGridRow.call(a,i,s,r):d)||(N(r).each(function(){var
e=a.p.idPrefix+N.jgrid.getAccessor(this,a.p.localReader.id);N(N(a).jqGrid("getGridRowById",e)).css("display",""),this[t]&&N(a).jqGrid("expandRow",this)}),N(a).triggerHandler("jqGridAfterExpandTreeGridRow",[i,s,r]),N.jgrid.isFunction(a.p.afterExpandTreeGridRow)&&a.p.afterExpandTreeGridRow.call(a,i,s,r),a.p.treeGrid_bigData)||(a.p.lastpage=e))})},collapseRow:function(a){this.each(function(){var
e,r,t,i,d=this;d.grid&&d.p.treeGrid&&(e=N(d).jqGrid("getNodeChildren",a),r=d.p.treeReader.expanded_field,t=a[d.p.localReader.id],!1!==(i=(i=void
0===(i=N(d).triggerHandler("jqGridBeforeCollapseTreeGridRow",[t,a,e]))?!0:i)&&N.jgrid.isFunction(d.p.beforeCollapseTreeGridRow)?d.p.beforeCollapseTreeGridRow.call(d,t,a,e):i))&&(N(e).each(function(){var
e=d.p.idPrefix+N.jgrid.getAccessor(this,d.p.localReader.id);N(N(d).jqGrid("getGridRowById",e)).css("display","none"),this[r]&&N(d).jqGrid("collapseRow",this)}),N(d).triggerHandler("jqGridAfterCollapseTreeGridRow",[t,a,e]),N.jgrid.isFunction(d.p.afterCollapseTreeGridRow))&&d.p.afterCollapseTreeGridRow.call(d,t,a,e)})},getRootNodes:function(){var
d=[];return this.each(function(){var
e,r,t=this,i=t.p.data;if(t.grid&&t.p.treeGrid)switch(t.p.treeGridModel){case"nested":e=t.p.treeReader.level_field,N(i).each(function(){parseInt(this[e],10)===parseInt(t.p.tree_root_level,10)&&d.push(this)});break;case"adjacency":r=t.p.treeReader.parent_id_field,N(i).each(function(){null!==this[r]&&"null"!==String(this[r]).toLowerCase()||d.push(this)})}}),d},getNodeDepth:function(r){var
t=null;return this.each(function(){if(this.grid&&this.p.treeGrid)switch(this.p.treeGridModel){case"nested":var
e=this.p.treeReader.level_field;t=parseInt(r[e],10)-parseInt(this.p.tree_root_level,10);break;case"adjacency":t=N(this).jqGrid("getNodeAncestors",r).length}}),t},getNodeParent:function(h){var
f=null;return this.each(function(){var
e=this;if(e.grid&&e.p.treeGrid)switch(e.p.treeGridModel){case"nested":var
r=e.p.treeReader.left_field,t=e.p.treeReader.right_field,i=e.p.treeReader.level_field,d=parseInt(h[r],10),a=parseInt(h[t],10),s=parseInt(h[i],10);N(this.p.data).each(function(){if(parseInt(this[i],10)===s-1&&parseInt(this[r],10)<d&&parseInt(this[t],10)>a)return f=this,!1});break;case"adjacency":for(var
l=e.p.treeReader.parent_id_field,n=e.p.localReader.id,p=h[n],o=e.p._index[p];o--;)if(String(e.p.data[o][n])===String(N.jgrid.stripPref(e.p.idPrefix,h[l]))){f=e.p.data[o];break}}}),f},getNodeChildren:function(f){var
c=[];return this.each(function(){var
e=this;if(e.grid&&e.p.treeGrid){var
r,t=this.p.data.length;switch(e.p.treeGridModel){case"nested":for(var
i=e.p.treeReader.left_field,d=e.p.treeReader.right_field,a=e.p.treeReader.level_field,s=parseInt(f[i],10),l=parseInt(f[d],10),n=parseInt(f[a],10),p=0;p<t;p++)(r=e.p.data[p])&&parseInt(r[a],10)===n+1&&parseInt(r[i],10)>s&&parseInt(r[d],10)<l&&c.push(r);break;case"adjacency":var
o=e.p.treeReader.parent_id_field,h=e.p.localReader.id;for(p=0;p<t;p++)(r=e.p.data[p])&&String(r[o])===String(N.jgrid.stripPref(e.p.idPrefix,f[h]))&&c.push(r)}}}),c},getFullTreeNode:function(h,f){var
c=[];return this.each(function(){var
r,t,i,d=this,a=d.p.treeReader.expanded_field;if(d.grid&&d.p.treeGrid)switch(null!=f&&"boolean"==typeof
f||(f=!1),d.p.treeGridModel){case"nested":var
e=d.p.treeReader.left_field,s=d.p.treeReader.right_field,l=d.p.treeReader.level_field,n=parseInt(h[e],10),p=parseInt(h[s],10),o=parseInt(h[l],10);N(this.p.data).each(function(){parseInt(this[l],10)>=o&&parseInt(this[e],10)>=n&&parseInt(this[e],10)<=p&&(f&&(this[a]=!0),c.push(this))});break;case"adjacency":h&&(c.push(h),t=d.p.treeReader.parent_id_field,i=d.p.localReader.id,N(this.p.data).each(function(e){for(r=c.length,e=0;e<r;e++)if(String(N.jgrid.stripPref(d.p.idPrefix,c[e][i]))===String(this[t])){f&&(this[a]=!0),c.push(this);break}}))}}),c},getNodeAncestors:function(r,t,i){var
d=[];return void
0===t&&(t=!1),this.each(function(){if(this.grid&&this.p.treeGrid){i=void
0!==i&&this.p.treeReader.expanded_field;for(var
e=N(this).jqGrid("getNodeParent",r);e;){if(i)try{e[i]=!0}catch(e){}t?d.unshift(e):d.push(e),e=N(this).jqGrid("getNodeParent",e)}}}),d},isVisibleNode:function(t){var
i=!0;return this.each(function(){var
e,r;this.grid&&this.p.treeGrid&&(e=N(this).jqGrid("getNodeAncestors",t),r=this.p.treeReader.expanded_field,N(e).each(function(){if(!(i=i&&this[r]))return!1}))}),i},isNodeLoaded:function(i){var
d;return this.each(function(){var
e,r,t=this;t.grid&&t.p.treeGrid&&(e=t.p.treeReader.leaf_field,r=t.p.treeReader.loaded,d=void
0!==i&&(void
0!==i[r]?i[r]:!!(i[e]||0<N(t).jqGrid("getNodeChildren",i).length)))}),d},setLeaf:function(d,a,s){return this.each(function(){var
e=N.jgrid.getAccessor(d,this.p.localReader.id),r=N("#"+e,this.grid.bDiv)[0],t=this.p.treeReader.leaf_field;try{var
i=this.p._index[e];null!=i&&(this.p.data[i][t]=a)}catch(e){}!0===a?N("div.treeclick",r).removeClass(this.p.treeIcons.minus+" tree-minus "+this.p.treeIcons.plus+" tree-plus").addClass(this.p.treeIcons.leaf+" tree-leaf"):!1===a&&(e=this.p.treeIcons.minus+" tree-minus",s&&(e=this.p.treeIcons.plus+" tree-plus"),N("div.treeclick",r).removeClass(this.p.treeIcons.leaf+" tree-leaf").addClass(e))})},reloadNode:function(o,h){return this.each(function(){var
e,r,t,i,d,a,s,l,n,p;this.grid&&this.p.treeGrid&&(r=this.p.localReader.id,e=this.p.selrow,N(this).jqGrid("delChildren",o[r]),(h=void
0===h?!1:h)||jQuery._data(this,"events").jqGridAfterSetTreeNode||N(this).on("jqGridAfterSetTreeNode.reloadNode",function(){var
e,r,t=this.p.treeReader.leaf_field;this.p.reloadnode&&(e=this.p.reloadnode,r=N(this).jqGrid("getNodeChildren",e),e[t]&&r.length?N(this).jqGrid("setLeaf",e,!1):e[t]||0!==r.length||N(this).jqGrid("setLeaf",e,!0)),this.p.reloadnode=!1}),r=this.p.treeReader.expanded_field,t=this.p.treeReader.parent_id_field,i=this.p.treeReader.loaded,d=this.p.treeReader.level_field,a=this.p.treeReader.leaf_field,s=this.p.treeReader.left_field,l=this.p.treeReader.right_field,n=N.jgrid.getAccessor(o,this.p.localReader.id),p=N("#"+n,this.grid.bDiv)[0],o[r]=!0,o[a]||N("div.treeclick",p).removeClass(this.p.treeIcons.plus+" tree-plus").addClass(this.p.treeIcons.minus+" tree-minus"),this.p.treeANode=p.rowIndex,this.p.datatype=this.p.treedatatype,this.p.reloadnode=o,h&&(this.p.treeANode=0<p.rowIndex?p.rowIndex-1:1,N(this).jqGrid("delRowData",n)),"nested"===this.p.treeGridModel?N(this).jqGrid("setGridParam",{postData:{nodeid:n,n_left:o[s],n_right:o[l],n_level:o[d]}}):N(this).jqGrid("setGridParam",{postData:{nodeid:n,parentid:o[t],n_level:o[d]}}),N(this).trigger("reloadGrid"),o[i]=!0,"nested"===this.p.treeGridModel?N(this).jqGrid("setGridParam",{selrow:e,postData:{nodeid:"",n_left:"",n_right:"",n_level:""}}):N(this).jqGrid("setGridParam",{selrow:e,postData:{nodeid:"",parentid:"",n_level:""}}))})},expandNode:function(o){return this.each(function(){var
e,r,t,i,d,a,s,l,n,p;this.grid&&this.p.treeGrid&&(e=this.p.treeReader.expanded_field,r=this.p.treeReader.parent_id_field,t=this.p.treeReader.loaded,i=this.p.treeReader.level_field,d=this.p.treeReader.left_field,a=this.p.treeReader.right_field,o[e]||(s=N.jgrid.getAccessor(o,this.p.localReader.id),l=N("#"+this.p.idPrefix+N.jgrid.jqID(s),this.grid.bDiv)[0],n=this.p._index[s],!1!==(p=(p=void
0===(p=N(this).triggerHandler("jqGridBeforeExpandTreeGridNode",[s,o]))?!0:p)&&N.jgrid.isFunction(this.p.beforeExpandTreeGridNode)?this.p.beforeExpandTreeGridNode.call(this,s,o):p)&&(N(this).jqGrid("isNodeLoaded",this.p.data[n])?(o[e]=!0,N("div.treeclick",l).removeClass(this.p.treeIcons.plus+" tree-plus").addClass(this.p.treeIcons.minus+" tree-minus")):this.grid.hDiv.loading||(o[e]=!0,N("div.treeclick",l).removeClass(this.p.treeIcons.plus+" tree-plus").addClass(this.p.treeIcons.minus+" tree-minus"),this.p.treeANode=l.rowIndex,this.p.datatype=this.p.treedatatype,"nested"===this.p.treeGridModel?N(this).jqGrid("setGridParam",{postData:{nodeid:s,n_left:o[d],n_right:o[a],n_level:o[i]}}):N(this).jqGrid("setGridParam",{postData:{nodeid:s,parentid:o[r],n_level:o[i]}}),N(this).trigger("reloadGrid"),o[t]=!0,"nested"===this.p.treeGridModel?N(this).jqGrid("setGridParam",{postData:{nodeid:"",n_left:"",n_right:"",n_level:""}}):N(this).jqGrid("setGridParam",{postData:{nodeid:"",parentid:"",n_level:""}})),N(this).triggerHandler("jqGridAfterExpandTreeGridNode",[s,o]),N.jgrid.isFunction(this.p.afterExpandTreeGridNode))&&this.p.afterExpandTreeGridNode.call(this,s,o)))})},collapseNode:function(d){return this.each(function(){var
e,r,t,i;this.grid&&this.p.treeGrid&&(e=this.p.treeReader.expanded_field,d[e])&&(r=N.jgrid.getAccessor(d,this.p.localReader.id),t=N("#"+this.p.idPrefix+N.jgrid.jqID(r),this.grid.bDiv)[0],(i=void
0===(i=N(this).triggerHandler("jqGridBeforeCollapseTreeGridNode",[r,d]))?!0:i)&&N.jgrid.isFunction(this.p.beforeCollapseTreeGridNode)&&(i=this.p.beforeCollapseTreeGridNode.call(this,r,d)),(d[e]=!1)!==i)&&(N("div.treeclick",t).removeClass(this.p.treeIcons.minus+" tree-minus").addClass(this.p.treeIcons.plus+" tree-plus"),N(this).triggerHandler("jqGridAfterCollapseTreeGridNode",[r,d]),N.jgrid.isFunction(this.p.afterCollapseTreeGridNode))&&this.p.afterCollapseTreeGridNode.call(this,r,d)})},SortTree:function(o,h,f,c){return this.each(function(){if(this.grid&&this.p.treeGrid){var
e,r,t,i,d,a=[],s=this,l=N(this).jqGrid("getRootNodes",s.p.search),l=N.jgrid.from.call(this,l);for(Boolean(s.p.sortTreeByNodeType)&&(d=s.p.sortTreeNodeOrder&&"desc"===s.p.sortTreeNodeOrder.toLowerCase()?"d":"a",l.orderBy(s.p.treeReader.leaf_field,d,f,c)),l.orderBy(o,h,f,c),e=0,r=(i=l.select()).length;e<r;e++)t=i[e],a.push(t),N(this).jqGrid("collectChildrenSortTree",a,t,o,h,f,c);var
n=N(this).jqGrid("getDataIDs"),p=1;N.each(a,function(e){var
r=N.jgrid.getAccessor(this,s.p.localReader.id);-1!==N.inArray(r,n)&&(N("#"+N.jgrid.jqID(s.p.id)+" tbody tr").eq(p).after(N("#"+N.jgrid.jqID(s.p.id)+" tbody tr#"+N.jgrid.jqID(r))),p++)}),i=l=null}})},searchTree:function(t){var
i,d,a,s,l,n,p,o=t.length||0,h=[],f=[],c=[];return this.each(function(){if(this.grid&&this.p.treeGrid&&o)for(i=this.p.localReader.id,p=0;p<o;p++){var
e;if(h=N(this).jqGrid("getNodeAncestors",t[p],!0,!0),Boolean(this.p.FullTreeSearchResult)?(e=N(this).jqGrid("getFullTreeNode",t[p],!0),h=h.concat(e)):h.push(t[p]),d=h[0][i],-1!==N.inArray(d,f))for(l=0,a=h.length;l<a;l++){var
r=!1;for(n=0,s=c.length;n<s;n++)if(h[l][i]===c[n][i]){r=!0;break}r||c.push(h[l])}else
f.push(d),c=c.concat(h)}}),c},collectChildrenSortTree:function(a,s,l,n,p,o){return this.each(function(){if(this.grid&&this.p.treeGrid){var
e,r,t,i,d=N(this).jqGrid("getNodeChildren",s,this.p.search),d=N.jgrid.from.call(this,d);for(d.orderBy(l,n,p,o),e=0,r=(i=d.select()).length;e<r;e++)t=i[e],a.push(t),N(this).jqGrid("collectChildrenSortTree",a,t,l,n,p,o)}})},setTreeRow:function(e,r){var
t=!1;return this.each(function(){this.grid&&this.p.treeGrid&&(t=N(this).jqGrid("setRowData",e,r))}),t},delTreeNode:function(h){return this.each(function(){var
e,r,t,i=this,d=i.p.localReader.id,a=i.p.treeReader.left_field,s=i.p.treeReader.right_field;if(i.grid&&i.p.treeGrid){h=N.jgrid.stripPref(i.p.idPrefix,h);var
l=i.p._index[h];if(void
0!==l){var
n,p=(n=parseInt(i.p.data[l][s],10))-parseInt(i.p.data[l][a],10)+1,o=N(i).jqGrid("getFullTreeNode",i.p.data[l]);if(0<o.length)for(e=0;e<o.length;e++)N(i).jqGrid("delRowData",i.p.idPrefix+o[e][d]);if("nested"===i.p.treeGridModel){if((r=N.jgrid.from.call(i,i.p.data).greater(a,n,{stype:"integer"}).select()).length)for(t
in
r)r.hasOwnProperty(t)&&(r[t][a]=parseInt(r[t][a],10)-p);if((r=N.jgrid.from.call(i,i.p.data).greater(s,n,{stype:"integer"}).select()).length)for(t
in
r)r.hasOwnProperty(t)&&(r[t][s]=parseInt(r[t][s],10)-p)}}}})},delChildren:function(h){return this.each(function(){var
e,r,t=this,i=t.p.localReader.id,d=t.p.treeReader.left_field,a=t.p.treeReader.right_field;if(t.grid&&t.p.treeGrid){h=N.jgrid.stripPref(t.p.idPrefix,h);var
s=t.p._index[h];if(void
0!==s){var
l,n=(l=parseInt(t.p.data[s][a],10))-parseInt(t.p.data[s][d],10)+1,p=N(t).jqGrid("getFullTreeNode",t.p.data[s]);if(0<p.length)for(var
o=0;o<p.length;o++)p[o][i]!==h&&N(t).jqGrid("delRowData",t.p.idPrefix+p[o][i]);if("nested"===t.p.treeGridModel){if((e=N.jgrid.from(t.p.data).greater(d,l,{stype:"integer"}).select()).length)for(r
in
e)e.hasOwnProperty(r)&&(e[r][d]=parseInt(e[r][d],10)-n);if((e=N.jgrid.from(t.p.data).greater(a,l,{stype:"integer"}).select()).length)for(r
in
e)e.hasOwnProperty(r)&&(e[r][a]=parseInt(e[r][a],10)-n)}}}})},addChildNode:function(e,r,t,i){var
d=this[0];if(t){var
a,s=d.p.treeReader.expanded_field,l=d.p.treeReader.leaf_field,n=d.p.treeReader.level_field,p=d.p.treeReader.parent_id_field,o=d.p.treeReader.left_field,h=d.p.treeReader.right_field,f=d.p.treeReader.loaded,c=0,g=r;if(void
0===i&&(i=!1),null==e){if(0<=(q=d.p.data.length-1))for(;0<=q;)c=Math.max(c,parseInt(d.p.data[q][d.p.localReader.id],10)),q--;e=c+1}var
u,G,j=N(d).jqGrid("getInd",r),v=!1;if(null==r||""===r)g=r=null,R="last",w=d.p.tree_root_level,q=d.p.data.length+1;else{var
_,R="after",I=N.jgrid.stripPref(d.p.idPrefix,r),I=d.p._index[I],w=(r=(_=d.p.data[I])[d.p.localReader.id],parseInt(_[n],10)+1),x=N(d).jqGrid("getFullTreeNode",_),q=x.length?(g=q=x[x.length-1][d.p.localReader.id],N(d).jqGrid("getInd",d.p.idPrefix+g)):N(d).jqGrid("getInd",d.p.idPrefix+r);if(_[l]&&(_[s]=v=!0,N(d.rows[j]).find("span.cell-wrapperleaf").removeClass("cell-wrapperleaf").addClass("cell-wrapper").end().find("div.tree-leaf").removeClass(d.p.treeIcons.leaf+" tree-leaf").addClass(d.p.treeIcons.minus+" tree-minus"),d.p.data[I][l]=!1,_[f]=!0),!1===q)throw"Parent item with id: "+g+" ("+r+") can't be found";q++}if(x=q+1,void
0===t[s]&&(t[s]=!1),void
0===t[f]&&(t[f]=!1),t[n]=w,void
0===t[l]&&(t[l]=!0),"adjacency"===d.p.treeGridModel&&(t[p]=r),"nested"===d.p.treeGridModel)if(null!==r){if(a=parseInt(_[h],10),(u=N.jgrid.from.call(d,d.p.data).greaterOrEquals(h,a,{stype:"integer"}).select()).length)for(G
in
u)u.hasOwnProperty(G)&&(u[G][o]=u[G][o]>a?parseInt(u[G][o],10)+2:u[G][o],u[G][h]=u[G][h]>=a?parseInt(u[G][h],10)+2:u[G][h]);t[o]=a,t[h]=a+1}else{if(a=parseInt(N(d).jqGrid("getCol",h,!1,"max"),10),(u=N.jgrid.from.call(d,d.p.data).greater(o,a,{stype:"integer"}).select()).length)for(G
in
u)u.hasOwnProperty(G)&&(u[G][o]=parseInt(u[G][o],10)+2);if((u=N.jgrid.from.call(d,d.p.data).greater(h,a,{stype:"integer"}).select()).length)for(G
in
u)u.hasOwnProperty(G)&&(u[G][h]=parseInt(u[G][h],10)+2);t[o]=a+1,t[h]=a+2}(null===r||N(d).jqGrid("isNodeLoaded",_)||v)&&(N(d).jqGrid("addRowData",e,t,R,d.p.idPrefix+g),N(d).jqGrid("setTreeNode",q,x)),_&&!_[s]&&i&&N(d.rows[j]).find("div.treeclick").click()}}})});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery"],e):e(jQuery)}(function(u){"use strict";u.fn.jqDrag=function(e){return n(this,e,"d")},u.fn.jqResize=function(e,t){return n(this,e,"r",t)},u.jqDnR={dnr:{},e:0,drag:function(e){return"d"==r.k?f.css({left:r.X+e.pageX-r.pX,top:r.Y+e.pageY-r.pY}):(f.css({width:Math.max(e.pageX-r.pX+r.W,0),height:Math.max(e.pageY-r.pY+r.H,0)}),i&&a.css({width:Math.max(e.pageX-i.pX+i.W,0),height:Math.max(e.pageY-i.pY+i.H,0)})),!1},stop:function(){u(document).off("mousemove",e.drag).off("mouseup",e.stop)}};var
a,i,e=u.jqDnR,r=e.dnr,f=e.e,n=function(e,t,n,o){return e.each(function(){(t=t?u(t,e):e).on("mousedown",{e:e,k:n},function(e){var
t=e.data,n={};if(f=t.e,a=!!o&&u(o),"relative"!=f.css("position"))try{f.position(n)}catch(e){}if(r={X:n.left||p("left")||0,Y:n.top||p("top")||0,W:p("width")||f[0].scrollWidth||0,H:p("height")||f[0].scrollHeight||0,pX:e.pageX,pY:e.pageY,k:t.k},i=!(!a||"d"==t.k)&&{X:n.left||s("left")||0,Y:n.top||s("top")||0,W:a[0].offsetWidth||s("width")||0,H:a[0].offsetHeight||s("height")||0,pX:e.pageX,pY:e.pageY,k:t.k},u("input.hasDatepicker",f[0])[0])try{u("input.hasDatepicker",f[0]).datepicker("hide")}catch(e){}return u(document).mousemove(u.jqDnR.drag).mouseup(u.jqDnR.stop),!1})})},p=function(e){return parseInt(f.css(e),10)||!1},s=function(e){return parseInt(a.css(e),10)||!1};u.fn.tinyDraggable=function(e){var
i=u.extend({handle:0,exclude:0},e);return this.each(function(){var
n,o,a=u(this);(i.handle?u(i.handle,a):a).on({mousedown:function(e){var
t;i.exclude&&~u.inArray(e.target,u(i.exclude,a))||(e.preventDefault(),t=a.offset(),n=e.pageX-t.left,o=e.pageY-t.top,u(document).on("mousemove.drag",function(e){a.offset({top:e.pageY-o,left:e.pageX-n})}))},mouseup:function(e){u(document).off("mousemove.drag")}})})}});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery"],e):e(jQuery)}(function(a){"use strict";a.fn.jqm=function(e){var
t={overlay:50,closeoverlay:!0,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:u,ajaxText:"",target:u,modal:u,toTop:u,onShow:u,onHide:u,onLoad:u};return this.each(function(){if(this._jqm)return c[this._jqm].c=a.extend({},c[this._jqm].c,e);o++,this._jqm=o,c[o]={c:a.extend(t,a.jqm.params,e),a:u,w:a(this).addClass("jqmID"+o),s:o},t.trigger&&a(this).jqmAddTrigger(t.trigger)})},a.fn.jqmAddClose=function(e){return i(this,e,"jqmHide")},a.fn.jqmAddTrigger=function(e){return i(this,e,"jqmShow")},a.fn.jqmShow=function(e){return this.each(function(){a.jqm.open(this._jqm,e)})},a.fn.jqmHide=function(e){return this.each(function(){a.jqm.close(this._jqm,e)})},a.jqm={hash:{},open:function(e,t){var
o=c[e],n=o.c,i="."+n.closeClass,s=0<(s=parseInt(o.w.css("z-index")))?s:3e3,r=a("<div></div>").css({height:"100%",width:"100%",position:"fixed",left:0,top:0,"z-index":s-1,opacity:n.overlay/100});return o.a||(o.t=t,o.a=!0,o.w.css("z-index",s),n.modal?(d[0]||setTimeout(function(){new
f("bind")},1),d.push(e)):0<n.overlay?n.closeoverlay&&o.w.jqmAddClose(r):r=u,o.o=r?r.addClass(n.overlayClass).prependTo("body"):u,n.ajax?(s=n.target||o.w,e=n.ajax,s="string"==typeof
s?a(s,o.w):a(s),e="@"===e.substr(0,1)?a(t).attr(e.substring(1)):e,s.html(n.ajaxText).load(e,function(){n.onLoad&&n.onLoad.call(this,o),i&&o.w.jqmAddClose(a(i,o.w)),h(o)})):i&&o.w.jqmAddClose(a(i,o.w)),n.toTop&&o.o&&o.w.before('<span id="jqmP'+o.w[0]._jqm+'"></span>').insertAfter(o.o),n.onShow?n.onShow(o):o.w.show(),h(o)),u},close:function(e){e=c[e];return e.a&&(e.a=u,d[0]&&(d.pop(),d[0]||new
f("unbind")),e.c.toTop&&e.o&&a("#jqmP"+e.w[0]._jqm).after(e.w).remove(),e.c.onHide?e.c.onHide(e):(e.w.hide(),e.o&&e.o.remove())),u},params:{}};var
o=0,c=a.jqm.hash,d=[],u=!1,h=function(e){void
0===e.c.focusField&&(e.c.focusField=0),0<=e.c.focusField&&t(e)},t=function(e){try{a(":input:visible",e.w)[parseInt(e.c.focusField,10)].focus()}catch(e){}},f=function(e){a(document)[e]("keypress",n)[e]("keydown",n)[e]("mousedown",n)},n=function(o){var
e=c[d[d.length-1]],n=!a(o.target).parents(".jqmID"+e.s)[0];return n&&a(".jqmID"+e.s).each(function(){var
e=a(this),t=e.offset();if(t.top<=o.pageY&&o.pageY<=t.top+e.height()&&t.left<=o.pageX&&o.pageX<=t.left+e.width())return n=!1}),!n},i=function(e,t,o){return e.each(function(){var
e=this._jqm;a(t).each(function(){this[o]||(this[o]=[],a(this).click(function(){for(var
e
in{jqmShow:1,jqmHide:1})for(var
t
in
this[e])c[this[e][t]]&&c[this[e][t]].w[e](this);return u})),this[o].push(e)})})}});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.base"],e):e(jQuery)}(function(v){"use strict";v.fmatter={},v.extend(v.fmatter,{isBoolean:function(e){return"boolean"==typeof
e},isObject:function(e){return e&&("object"==typeof
e||v.jgrid.isFunction(e))||!1},isString:function(e){return"string"==typeof
e},isNumber:function(e){return"number"==typeof
e&&isFinite(e)},isValue:function(e){return this.isObject(e)||this.isString(e)||this.isNumber(e)||this.isBoolean(e)},isEmpty:function(e){return!(!this.isString(e)&&this.isValue(e)||this.isValue(e)&&""!==v.jgrid.trim(e).replace(/\&nbsp\;/gi,"").replace(/\&#160\;/gi,""))}}),v.fn.fmatter=function(e,t,i,r,o){var
n=t;i=v.extend({},v.jgrid.getRegional(this,"formatter"),i);try{n=v.fn.fmatter[e].call(this,t,i,r,o)}catch(e){}return n},v.fmatter.util={NumberFormat:function(e,t){if(v.fmatter.isNumber(e)||(e*=1),v.fmatter.isNumber(e)){var
i=e<0,r=String(e),o=t.decimalSeparator||".";if(v.fmatter.isNumber(t.decimalPlaces)){var
n=t.decimalPlaces,a=(r=String(Number(Math.round(e+"e"+n)+"e-"+n))).lastIndexOf(".");if(0<n)for(a<0?a=(r+=o).length-1:"."!==o&&(r=r.replace(".",o));r.length-1-a<n;)r+="0"}if(t.thousandsSeparator){for(var
l=t.thousandsSeparator,d=(a=-1<(a=r.lastIndexOf(o))?a:r.length,r.substring(a)),s=-1,f=a;0<f;f--)++s%3==0&&f!==a&&(!i||1<f)&&(d=l+d),d=r.charAt(f-1)+d;r=d}return r=t.prefix?t.prefix+r:r,r=t.suffix?r+t.suffix:r}return e}},v.fn.fmatter.defaultFormat=function(e,t){return v.fmatter.isValue(e)&&""!==e?e:t.defaultValue||"&#160;"},v.fn.fmatter.email=function(e,t){return v.fmatter.isEmpty(e)?v.fn.fmatter.defaultFormat(e,t):'<a href="mailto:'+e+'">'+e+"</a>"},v.fn.fmatter.checkbox=function(e,t){var
i=v.extend({},t.checkbox),t=!0===(i=void
0!==t.colModel&&void
0!==t.colModel.formatoptions?v.extend({},i,t.colModel.formatoptions):i).disabled?'disabled="disabled"':"";return!v.fmatter.isEmpty(e)&&void
0!==e||(e=v.fn.fmatter.defaultFormat(e,i)),'<input type="checkbox" '+((e=((e=String(e))+"").toLowerCase()).search(/(false|f|0|no|n|off|undefined)/i)<0?" checked='checked' ":"")+' value="'+e+'" offval="no" '+t+"/>"},v.fn.fmatter.link=function(e,t){var
i={target:t.target},r="";return(i=void
0!==t.colModel&&void
0!==t.colModel.formatoptions?v.extend({},i,t.colModel.formatoptions):i).target&&(r="target="+i.target),v.fmatter.isEmpty(e)?v.fn.fmatter.defaultFormat(e,t):"<a "+r+' href="'+e+'">'+e+"</a>"},v.fn.fmatter.showlink=function(e,t){var
i={baseLinkUrl:t.baseLinkUrl,showAction:t.showAction,addParam:t.addParam||"",target:t.target,idName:t.idName},r="";return(i=void
0!==t.colModel&&void
0!==t.colModel.formatoptions?v.extend({},i,t.colModel.formatoptions):i).target&&(r="target="+i.target),i=i.baseLinkUrl+i.showAction+"?"+i.idName+"="+t.rowId+i.addParam,v.fmatter.isString(e)||v.fmatter.isNumber(e)?"<a "+r+' href="'+i+'">'+e+"</a>":v.fn.fmatter.defaultFormat(e,t)},v.fn.fmatter.integer=function(e,t){var
i=v.extend({},t.integer);return void
0!==t.colModel&&void
0!==t.colModel.formatoptions&&(i=v.extend({},i,t.colModel.formatoptions)),v.fmatter.isEmpty(e)?i.defaultValue:v.fmatter.util.NumberFormat(e,i)},v.fn.fmatter.number=function(e,t){var
i=v.extend({},t.number);return void
0!==t.colModel&&void
0!==t.colModel.formatoptions&&(i=v.extend({},i,t.colModel.formatoptions)),v.fmatter.isEmpty(e)?i.defaultValue:v.fmatter.util.NumberFormat(e,i)},v.fn.fmatter.currency=function(e,t){var
i=v.extend({},t.currency);return void
0!==t.colModel&&void
0!==t.colModel.formatoptions&&(i=v.extend({},i,t.colModel.formatoptions)),v.fmatter.isEmpty(e)?i.defaultValue:v.fmatter.util.NumberFormat(e,i)},v.fn.fmatter.date=function(e,t,i,r){var
o=v.extend({},t.date);return!(o=void
0!==t.colModel&&void
0!==t.colModel.formatoptions?v.extend({},o,t.colModel.formatoptions):o).reformatAfterEdit&&"edit"===r||v.fmatter.isEmpty(e)?v.fn.fmatter.defaultFormat(e,t):v.jgrid.parseDate.call(this,o.srcformat,e,o.newformat,o)},v.fn.fmatter.select=function(e,t){e=String(e);var
i,r,o=!1,n=[];if(void
0!==t.colModel.formatoptions?(o=t.colModel.formatoptions.value,i=void
0===t.colModel.formatoptions.separator?":":t.colModel.formatoptions.separator,r=void
0===t.colModel.formatoptions.delimiter?";":t.colModel.formatoptions.delimiter):void
0!==t.colModel.editoptions&&(o=t.colModel.editoptions.value,i=void
0===t.colModel.editoptions.separator?":":t.colModel.editoptions.separator,r=void
0===t.colModel.editoptions.delimiter?";":t.colModel.editoptions.delimiter),o){var
a,l=!0==(null!=t.colModel.editoptions&&!0===t.colModel.editoptions.multiple),d=[];if(l&&(d=e.split(","),d=v.map(d,function(e){return v.jgrid.trim(e)})),v.fmatter.isString(o)){for(var
s=o.split(r),f=0,c=0;c<s.length;c++)if(2<(a=s[c].split(i)).length&&(a[1]=v.map(a,function(e,t){if(0<t)return e}).join(i)),l)-1<v.inArray(a[0],d)&&(n[f]=a[1],f++);else
if(v.jgrid.trim(a[0])===v.jgrid.trim(e)){n[0]=a[1];break}}else
v.fmatter.isObject(o)&&(l?n=v.map(d,function(e){return o[e]}):n[0]=o[e]||"")}return""===(e=n.join(", "))?v.fn.fmatter.defaultFormat(e,t):e},v.fn.fmatter.rowactions=function(e){function
t(e){v.jgrid.isFunction(s.afterRestore)&&s.afterRestore.call(a,e),d.find("div.ui-inline-edit,div.ui-inline-del").show(),d.find("div.ui-inline-save,div.ui-inline-cancel").hide()}var
i=v(this).closest("tr.jqgrow"),r=i.attr("id"),o=v(this).closest("table.ui-jqgrid-btable").attr("id").replace(/_frozen([^_]*)$/,"$1"),n=v("#"+o),a=n[0],o=a.p,l=o.colModel[v.jgrid.getCellIndex(this)],d=l.frozen?v("tr#"+r+" td",n).eq(v.jgrid.getCellIndex(this)).find("> div"):v(this).parent(),s={extraparam:{}},f=(void
0!==l.formatoptions&&(l=v.extend(!0,{},l.formatoptions),s=v.extend(s,l)),void
0!==o.editOptions&&(s.editOptions=o.editOptions),void
0!==o.delOptions&&(s.delOptions=o.delOptions),i.hasClass("jqgrid-new-row")&&(s.extraparam[o.prmNames.oper]=o.prmNames.addoper),{keys:s.keys,oneditfunc:s.onEdit,successfunc:s.onSuccess,url:s.url,extraparam:s.extraparam,aftersavefunc:function(e,t){v.jgrid.isFunction(s.afterSave)&&s.afterSave.call(a,e,t),d.find("div.ui-inline-edit,div.ui-inline-del").show(),d.find("div.ui-inline-save,div.ui-inline-cancel").hide()},errorfunc:s.onError,afterrestorefunc:t,restoreAfterError:s.restoreAfterError,mtype:s.mtype});switch(e){case"edit":n.jqGrid("editRow",r,f),d.find("div.ui-inline-edit,div.ui-inline-del").hide(),d.find("div.ui-inline-save,div.ui-inline-cancel").show(),n.triggerHandler("jqGridAfterGridComplete");break;case"save":n.jqGrid("saveRow",r,f)&&(d.find("div.ui-inline-edit,div.ui-inline-del").show(),d.find("div.ui-inline-save,div.ui-inline-cancel").hide(),n.triggerHandler("jqGridAfterGridComplete"));break;case"cancel":n.jqGrid("restoreRow",r,t),d.find("div.ui-inline-edit,div.ui-inline-del").show(),d.find("div.ui-inline-save,div.ui-inline-cancel").hide(),n.triggerHandler("jqGridAfterGridComplete");break;case"del":n.jqGrid("delGridRow",r,s.delOptions);break;case"formedit":n.jqGrid("setSelection",r),n.jqGrid("editGridRow",r,s.editOptions)}},v.fn.fmatter.actions=function(e,t){var
i={keys:!1,editbutton:!0,delbutton:!0,editformbutton:!1},r=t.rowId,o="",n=v.jgrid.getRegional(this,"nav"),a=v.jgrid.styleUI[t.styleUI||"jQueryUI"].fmatter,l=v.jgrid.styleUI[t.styleUI||"jQueryUI"].common;return void
0!==t.colModel.formatoptions&&(i=v.extend(i,t.colModel.formatoptions)),void
0===r||v.fmatter.isEmpty(r)?"":(t="onmouseover=jQuery(this).addClass('"+l.hover+"'); onmouseout=jQuery(this).removeClass('"+l.hover+"');  ",i.editformbutton?o+="<div title='"+n.edittitle+"' style='float:left;cursor:pointer;' class='ui-pg-div ui-inline-edit' "+("id='jEditButton_"+r+"' onclick=jQuery.fn.fmatter.rowactions.call(this,'formedit'); "+t)+"><span class='"+l.icon_base+" "+a.icon_edit+"'></span></div>":i.editbutton&&(o+="<div title='"+n.edittitle+"' style='float:left;cursor:pointer;' class='ui-pg-div ui-inline-edit' "+("id='jEditButton_"+r+"' onclick=jQuery.fn.fmatter.rowactions.call(this,'edit'); "+t)+"><span class='"+l.icon_base+" "+a.icon_edit+"'></span></div>"),i.delbutton&&(o+="<div title='"+n.deltitle+"' style='float:left;' class='ui-pg-div ui-inline-del' "+("id='jDeleteButton_"+r+"' onclick=jQuery.fn.fmatter.rowactions.call(this,'del'); "+t)+"><span class='"+l.icon_base+" "+a.icon_del+"'></span></div>"),"<div style='margin-left:8px;'>"+(o=(o+="<div title='"+n.savetitle+"' style='float:left;display:none' class='ui-pg-div ui-inline-save' "+("id='jSaveButton_"+r+"' onclick=jQuery.fn.fmatter.rowactions.call(this,'save'); "+t)+"><span class='"+l.icon_base+" "+a.icon_save+"'></span></div>")+("<div title='"+n.canceltitle+"' style='float:left;display:none;' class='ui-pg-div ui-inline-cancel' "+("id='jCancelButton_"+r+"' onclick=jQuery.fn.fmatter.rowactions.call(this,'cancel'); "+t)+"><span class='"+l.icon_base+" "+a.icon_cancel+"'></span></div>"))+"</div>")},v.unformat=function(e,t,i,r){var
o=t.colModel.formatter,n=t.colModel.formatoptions||{},a=/([\.\*\_\'\(\)\{\}\+\?\\])/g,l=t.colModel.unformat||v.fn.fmatter[o]&&v.fn.fmatter[o].unformat;if(void
0!==l&&v.jgrid.isFunction(l))c=l.call(this,v(e).text(),t,e);else
if(void
0!==o&&v.fmatter.isString(o)){var
d,s=v.jgrid.getRegional(this,"formatter")||{};switch(o){case"integer":f=(n=v.extend({},s.integer,n)).thousandsSeparator.replace(a,"\\$1"),d=new
RegExp(f,"g"),c=v(e).text().replace(d,"");break;case"number":f=(n=v.extend({},s.number,n)).thousandsSeparator.replace(a,"\\$1"),d=new
RegExp(f,"g"),c=v(e).text().replace(d,"").replace(n.decimalSeparator,".");break;case"currency":f=(n=v.extend({},s.currency,n)).thousandsSeparator.replace(a,"\\$1"),d=new
RegExp(f,"g"),c=v(e).text(),n.prefix&&n.prefix.length&&(c=c.substr(n.prefix.length)),c=(c=n.suffix&&n.suffix.length?c.substr(0,c.length-n.suffix.length):c).replace(d,"").replace(n.decimalSeparator,".");break;case"checkbox":var
f=t.colModel.editoptions?t.colModel.editoptions.value.split(":"):["Yes","No"],c=v("input",e).is(":checked")?f[0]:f[1];break;case"select":c=v.unformat.select(e,t,i,r);break;case"actions":return"";default:c=v(e).text()}}return void
0!==c?c:!0===r?v(e).text():v.jgrid.htmlDecode(v(e).html())},v.unformat.select=function(e,t,i,r){var
o=[],n=v(e).text();if(!0===r)return n;var
a=v.extend({},void
0!==t.colModel.formatoptions?t.colModel.formatoptions:t.colModel.editoptions),l=void
0===a.separator?":":a.separator,e=void
0===a.delimiter?";":a.delimiter;if(a.value){var
d,s=a.value,f=!0===a.multiple,c=[];if(f&&(c=n.split(","),c=v.map(c,function(e){return v.jgrid.trim(e)})),v.fmatter.isString(s)){for(var
u=s.split(e),m=0,p=0;p<u.length;p++)if(2<(d=u[p].split(l)).length&&(d[1]=v.map(d,function(e,t){if(0<t)return e}).join(l)),a.decodeValue&&!0===a.decodeValue&&(d[1]=v.jgrid.htmlDecode(d[1])),f)-1<v.inArray(v.jgrid.trim(d[1]),c)&&(o[m]=d[0],m++);else
if(v.jgrid.trim(d[1])===v.jgrid.trim(n)){o[0]=d[0];break}}else(v.fmatter.isObject(s)||Array.isArray(s))&&(f||(c[0]=n),o=v.map(c,function(i){var
r;if(v.each(s,function(e,t){if(t===i)return r=e,!1}),void
0!==r)return r}));return o.join(", ")}return n||""},v.unformat.date=function(e,t){var
i=v.jgrid.getRegional(this,"formatter.date")||{};return void
0!==t.formatoptions&&(i=v.extend({},i,t.formatoptions)),v.fmatter.isEmpty(e)?v.fn.fmatter.defaultFormat(e,t):v.jgrid.parseDate.call(this,i.newformat,e,i.srcformat,i)}});!function(t){"use strict";"function"==typeof
define&&define.amd?define(["jquery"],t):t(jQuery)}(function(s){"use strict";var
d,o=s();s.fn.html5sortable=function(r){var
t=String(r);return r=s.extend({connectWith:!1},r),this.each(function(){var
e,n,i,a;/^enable|disable|destroy$/.test(t)?(i=s(this).children(s(this).data("items")).attr("draggable","enable"===t),"destroy"===t&&i.add(this).removeData("connectWith items").off("dragstart.h5s dragend.h5s selectstart.h5s dragover.h5s dragenter.h5s drop.h5s")):(i=s(this).children(r.items),a=s("<"+(/^ul|ol$/i.test(this.tagName)?"li":/^tbody$/i.test(this.tagName)?"tr":"div")+' class="sortable-placeholder '+r.placeholderClass+'">').html("&nbsp;"),i.find(r.handle).mousedown(function(){e=!0}).mouseup(function(){e=!1}),s(this).data("items",r.items),o=o.add(a),r.connectWith&&s(r.connectWith).add(this).data("connectWith",r.connectWith),i.attr("draggable","true").on("dragstart.h5s",function(t){if(r.handle&&!e)return!1;e=!1;t=t.originalEvent.dataTransfer;t.effectAllowed="move",t.setData("Text","dummy"),n=(d=s(this)).addClass("sortable-dragging").index()}).on("dragend.h5s",function(){d&&(d.removeClass("sortable-dragging").show(),o.detach(),n!==d.index()&&d.parent().trigger("sortupdate",{item:d,startindex:n,endindex:d.index()}),d=null)}).not("a[href], img").on("selectstart.h5s",function(){return this.dragDrop&&this.dragDrop(),!1}).end().add([this,a]).on("dragover.h5s dragenter.h5s drop.h5s",function(t){return!i.is(d)&&r.connectWith!==s(d).parent().data("connectWith")||("drop"===t.type?(t.stopPropagation(),o.filter(":visible").after(d),d.trigger("dragend.h5s")):(t.preventDefault(),t.originalEvent.dataTransfer.dropEffect="move",i.is(this)?(r.forcePlaceholderSize&&a.height(d.outerHeight()),d.hide(),s(this)[a.index()<s(this).index()?"after":"before"](a),o.not(a).detach()):o.is(this)||s(this).children(r.items).length||(o.detach(),s(this).append(a))),!1)}))})}});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery"],e):e(jQuery)}(function(a){"use strict";a.extend(a.jgrid,{isJSON:function(e){"string"!=typeof
e&&(e=JSON.stringify(e));try{return JSON.parse(e),!0}catch(e){return!1}},stringify:function(e){return JSON.stringify(e,function(e,n){return"function"==typeof
n?n.toString():n})},parseFunc:function(e){return JSON.parse(e,function(e,n){var
t;return"string"==typeof
n&&-1!==n.indexOf("function")&&((t=n.split(" "))[0]=a.jgrid.trim(t[0].toLowerCase()),0===t[0].indexOf("function"))&&"}"===n.trim().slice(-1)?a.jgrid.runCode(n):n})},encode:function(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},jsonToXML:function(e,n){var
d=a.extend({xmlDecl:'<?xml version="1.0" encoding="UTF-8" ?>\n',attr_prefix:"-",encode:!0},n||{}),l=this,u=function(e,n){return"#text"===e?d.encode?l.encode(n):n:"function"==typeof
n?"<"+e+"><![CDATA["+n+"]]></"+e+">\n":""===n?"<"+e+">__EMPTY_STRING_</"+e+">\n":"<"+e+">"+(d.encode?l.encode(n):n)+"</"+e+">\n"},f=function(e,n){for(var
t=[],r=0;r<n.length;r++){var
o=n[r];void
0===o||null==o?t[t.length]="<"+e+" />":"object"==typeof
o&&o.constructor==Array?t[t.length]=f(e,o):t[t.length]=("object"==typeof
o?s:u)(e,o)}return t.length||(t[0]="<"+e+">__EMPTY_ARRAY_</"+e+">\n"),t.join("")},s=function(e,n){var
t,r,o=[],i=[];for(t
in
n)n.hasOwnProperty(t)&&(r=n[t],t.charAt(0)!==d.attr_prefix?null==r?o[o.length]="<"+t+" />":"object"==typeof
r&&r.constructor===Array?o[o.length]=f(t,r):o[o.length]=("object"==typeof
r?s:u)(t,r):i[i.length]=" "+t.substring(1)+'="'+(d.encode?l.encode(r):r)+'"');var
c=i.join(""),a=o.join("");return a=null!=e?0<o.length?a.match(/\n/)?"<"+e+c+">\n"+a+"</"+e+">\n":"<"+e+c+">"+a+"</"+e+">\n":"<"+e+c+" />\n":a},n=s(null,e);return d.xmlDecl+n},xmlToJSON:function(e,n){var
d=a.extend({force_array:[],attr_prefix:"-"},n||{});if(e){var
o={};if(d.force_array)for(var
t=0;t<d.force_array.length;t++)o[d.force_array[t]]=1;(e="string"==typeof
e?a.parseXML(e):e).documentElement&&(e=e.documentElement);var
r,l=function(e,n,t,r){if("string"==typeof
r)if(-1!==r.indexOf("function"))r=a.jgrid.runCode(r);else
switch(r){case"__EMPTY_ARRAY_":r=[];break;case"__EMPTY_STRING_":r="";break;case"false":r=!1;break;case"true":r=!0}o[n]?(1===t&&(e[n]=[]),e[n][e[n].length]=r):1===t?e[n]=r:2===t?e[n]=[e[n],r]:e[n][e[n].length]=r},u=function(e){if(7!==e.nodeType){if(3===e.nodeType||4===e.nodeType)return null==e.nodeValue.match(/[^\x00-\x20]/)?void
0:e.nodeValue;var
n,t,r,o={};if(e.attributes&&e.attributes.length)for(n={},c=0;c<e.attributes.length;c++)"string"==typeof(t=e.attributes[c].nodeName)&&(r=e.attributes[c].nodeValue)&&(void
0===o[t=d.attr_prefix+t]&&(o[t]=0),o[t]++,l(n,t,o[t],r));if(e.childNodes&&e.childNodes.length){for(var
i=n?!1:!0,c=0;c<e.childNodes.length&&i;c++){var
a=e.childNodes[c].nodeType;3!==a&&4!==a&&(i=!1)}if(i)for(n=n||"",c=0;c<e.childNodes.length;c++)n+=e.childNodes[c].nodeValue;else
for(n=n||{},c=0;c<e.childNodes.length;c++)"string"==typeof(t=e.childNodes[c].nodeName)&&(r=u(e.childNodes[c]))&&(void
0===o[t]&&(o[t]=0),o[t]++,l(n,t,o[t],r))}return n}},n=u(e);return o[e.nodeName]&&(n=[n]),11!==e.nodeType&&((r={})[e.nodeName]=n,n=r),n}},saveAs:function(e,n,t){t=a.extend(!0,{type:"plain/text;charset=utf-8"},t||{});var
r,o,i,c=[];n=null==n||""===n?"jqGridFile.txt":n,Array.isArray(e)?c=e:c[0]=e;try{r=new
File(c,n,t)}catch(e){r=new
Blob(c,t)}window.navigator&&window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(r,n):(o=URL.createObjectURL(r),(i=document.createElement("a")).href=o,i.download=n,document.body.appendChild(i),i.click(),setTimeout(function(){document.body.removeChild(i),window.URL.revokeObjectURL(o)},0))},csvToArray:function(e,n){void
0===n&&(n=",");for(var
t,r,o=[],i=[],c={},a=0,d=0,l=new
RegExp("(\\"+n+'|\\r?\\n|\\r|^)(?:"([^"]*(?:""[^"]*)*)"|([^"\\'+n+"\\r\\n]*))","gi");t=l.exec(e);){var
u=t[1];u.length&&u!==n&&(d++,c={},a=0),u=t[2]?t[2].replace(new
RegExp('""',"g"),'"'):t[3],0===d?(o.push(u),r=o.length):(c[o[a]]=u,a===r-1?i.push(c):a++)}return i}})});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.base","./jquery.fmatter","./grid.utils"],e):e(jQuery)}(function(J){"use strict";J.jgrid=J.jgrid||{},J.extend(J.jgrid,{formatCell:function(e,t,r,l,o,a){return void
0!==l.formatter?(t={rowId:"",colModel:l,gid:o.p.id,pos:t,styleUI:"",isExported:!0,exporttype:a},J.jgrid.isFunction(l.formatter)?l.formatter.call(o,e,t,r):J.fmatter?J.fn.fmatter.call(o,l.formatter,e,t,r):e):e},formatCellCsv:function(t,e){t=null==t?"":String(t);try{t=J.jgrid.stripHtml(t.replace(e._regexsep,e.separatorReplace).replace(/\r\n/g,e.replaceNewLine).replace(/\n/g,e.replaceNewLine))}catch(e){t=""}return t=-1!==(t=e.escquote?t.replace(e._regexquot,e.escquote+e.quote):t).indexOf(e.separator)&&-1!==t.indexOf(e.qoute)?t:e.quote+t+e.quote},excelCellPos:function(e){for(var
t="A".charCodeAt(0),r="Z".charCodeAt(0)-t+1,l="";0<=e;)l=String.fromCharCode(e%r+t)+l,e=Math.floor(e/r)-1;return l},makeNode:function(e,t,r){var
l=e.createElement(t);return r&&(r.attr&&J(l).attr(r.attr),r.children&&J.each(r.children,function(e,t){l.appendChild(t)}),r.hasOwnProperty("text"))&&l.appendChild(e.createTextNode(r.text)),l},xmlToZip:function(o,e){var
a,n,d,i,p,s=this,m=new
XMLSerializer,f=-1===m.serializeToString(J.parseXML(J.jgrid.excelStrings["xl/worksheets/sheet1.xml"])).indexOf("xmlns:r"),u=[];J.each(e,function(e,t){if(J.isPlainObject(t))p=o.folder(e),s.xmlToZip(p,t);else{if(f){for(a=t.childNodes[0],n=a.attributes.length-1;0<=n;n--){var
r=a.attributes[n].nodeName,l=a.attributes[n].nodeValue;-1!==r.indexOf(":")&&(u.push({name:r,value:l}),a.removeAttribute(r))}for(n=0,d=u.length;n<d;n++)(i=t.createAttribute(u[n].name.replace(":","_dt_b_namespace_token_"))).value=u[n].value,a.setAttributeNode(i)}p=m.serializeToString(t),p=(p=f?(p=-1===p.indexOf("<?xml")?'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+p:p).replace(/_dt_b_namespace_token_/g,":"):p).replace(/<row xmlns="" /g,"<row ").replace(/<cols xmlns="">/g,"<cols>").replace(/<mergeCells xmlns="" /g,"<mergeCells ").replace(/<numFmt xmlns="" /g,"<numFmt ").replace(/<xf xmlns="" /g,"<xf "),o.file(e,p)}})},excelStrings:{"_rels/.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>',"xl/_rels/workbook.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>',"[Content_Types].xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Default Extension="jpeg" ContentType="image/jpeg" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" /></Types>',"xl/workbook.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="24816"/><workbookPr showInkAnnotation="0" autoCompressPictures="0"/><bookViews><workbookView xWindow="0" yWindow="0" windowWidth="25600" windowHeight="19020" tabRatio="500"/></bookViews><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets></workbook>',"xl/worksheets/sheet1.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><sheetData/></worksheet>',"xl/styles.xml":'<?xml version="1.0" encoding="UTF-8"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><numFmts count="7"><numFmt numFmtId="164" formatCode="#,##0.00_- [$$-45C]"/><numFmt numFmtId="165" formatCode="&quot;£&quot;#,##0.00"/><numFmt numFmtId="166" formatCode="[$€-2] #,##0.00"/><numFmt numFmtId="167" formatCode="0.0%"/><numFmt numFmtId="168" formatCode="#,##0;(#,##0)"/><numFmt numFmtId="169" formatCode="#,##0.00;(#,##0.00)"/><numFmt numFmtId="170" formatCode="yyyy/mm/dd;@"/></numFmts><fonts count="5" x14ac:knownFonts="1"><font><sz val="11" /><name val="Calibri" /></font><font><sz val="11" /><name val="Calibri" /><color rgb="FFFFFFFF" /></font><font><sz val="11" /><name val="Calibri" /><b /></font><font><sz val="11" /><name val="Calibri" /><i /></font><font><sz val="11" /><name val="Calibri" /><u /></font></fonts><fills count="6"><fill><patternFill patternType="none" /></fill><fill/><fill><patternFill patternType="solid"><fgColor rgb="FFD9D9D9" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="FFD99795" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="ffc6efce" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="ffc6cfef" /><bgColor indexed="64" /></patternFill></fill></fills><borders count="2"><border><left /><right /><top /><bottom /><diagonal /></border><border diagonalUp="false" diagonalDown="false"><left style="thin"><color auto="1" /></left><right style="thin"><color auto="1" /></right><top style="thin"><color auto="1" /></top><bottom style="thin"><color auto="1" /></bottom><diagonal /></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" /></cellStyleXfs><cellXfs count="68"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="left"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="center"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="right"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="fill"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment textRotation="90"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment wrapText="1"/></xf><xf numFmtId="9"   fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="164" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="165" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="166" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="167" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="168" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="169" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="3" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="4" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="1" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="2" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="170" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="49" fontId="0" fillId="0" borderId="0" xfId="0" applyNumberFormat="1"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0" /></cellStyles><dxfs count="0" /><tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4" /></styleSheet>'},excelParsers:[{match:/^\-?\d+\.\d%$/,style:60,fmt:function(e){return e/100}},{match:/^\-?\d+\.?\d*%$/,style:56,fmt:function(e){return e/100}},{match:/^\-?\$[\d,]+.?\d*$/,style:57},{match:/^\-?£[\d,]+.?\d*$/,style:58},{match:/^\-?€[\d,]+.?\d*$/,style:59},{match:/^\-?\d+$/,style:65},{match:/^\-?\d+\.\d{2}$/,style:66},{match:/^\([\d,]+\)$/,style:61,fmt:function(e){return-1*e.replace(/[\(\)]/g,"")}},{match:/^\([\d,]+\.\d{2}\)$/,style:62,fmt:function(e){return-1*e.replace(/[\(\)]/g,"")}},{match:/^\-?[\d,]+$/,style:63},{match:/^\-?[\d,]+\.\d{2}$/,style:64},{match:/^\d{4}\-\d{2}\-\d{2}$/,style:67},{match:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/gi,style:4}],addExcelStyle:function(e,t,r,l){t=J.extend({numFmtId:"0",fontId:"0",fillId:"0",borderId:"0",applyFont:"1",applyFill:"1",applyBorder:"1",xfId:"0",applyNumberFormat:"0",applyAlignment:"0"},t||{}),r=J.extend({horizontal:"left",indent:"0",shrinkToFit:"1",textRotation:"0",vertical:"center",wrapText:"0"},r||{}),J.isEmptyObject(e)&&(e.excel_parsers=!0);var
o,a,n,d,i=l.getElementsByTagName("numFmts")[0],p=l.getElementsByTagName("cellXfs")[0],s=null,m=null;for(o
in
e)e.hasOwnProperty(o)&&(-1!==o.indexOf("format")&&(s=o),-1!==o.indexOf("style"))&&(m=o);return m&&!e[m]&&(a=d=0,s&&e[s]&&(n=J(i.getElementsByTagName("numFmt")),J.each(n,function(e,t){d++,a=Math.max(a,parseInt(J(t).attr("numFmtId"),10))}),n=J.jgrid.makeNode(l,"numFmt",{attr:{numFmtId:a+1,formatCode:e[s]}}),i.appendChild(n),J(i).attr("count",d+1)),i=0!==a?a+1+"":"0",d=0,t.numFmtId=i,n="1"===t.applyAlignment?J.jgrid.makeNode(l,"xf",{attr:t,children:[J.jgrid.makeNode(l,"alignment",{attr:r})]}):J.jgrid.makeNode(l,"xf",{attr:t}),p.appendChild(n),d=parseInt(J(p).attr("count"),10),J(p).attr("count",d+1),e[m]=d+1),e}}),J.jgrid.extend({exportToCsv:function(T){T=J.extend(!0,{separator:",",separatorReplace:" ",quote:'"',escquote:'"',newLine:"\r\n",replaceNewLine:" ",includeCaption:!0,includeLabels:!0,includeGroupHeader:!0,includeFooter:!0,includeHeader:!0,fileName:"jqGridExport.csv",mimetype:"text/csv;charset=utf-8",returnAsString:!1,onBeforeExport:null,treeindent:" ",visibleTreeNodes:!1,loadIndicator:!0},T||{});var
k="";if(this.each(function(){T._regexsep=new
RegExp(T.separator,"g"),T._regexquot=new
RegExp(T.quote,"g");var
e,t,j=this,r=j.p.treeGrid?J(j).jqGrid("getRowData",null,!0,T.treeindent,T.visibleTreeNodes):j.addLocalData(!0),l=r.length,o=j.p.colModel,a=o.length,n=j.p.colNames,d=0,i="",p="",s="",m="",f="",u=[],c="";function
g(s,m){var
f="",u=j.p.groupingView,c=[],g=u.groupField.length,y=j.p.colModel,h=y.length,x=0;function
I(e,t,r,l){for(var
o,a,n=function(e,t,r){var
l,o=!1;if(0===t)o=r[e];else{var
a=r[e].idx;if(0===a)o=r[e];else
for(l=e;0<=l;l--)if(r[l].idx===a-t){o=r[l];break}}return o}(e,t,r),d=n.cnt,i=new
Array(m.collen),p=0,s=l;s<h;s++)y[s]._expcol&&(a="{0}",J.each(n.summary,function(){if(this.nm===y[s].name){y[s].summaryTpl&&(a=y[s].summaryTpl),o=this.v,"string"==typeof
this.st&&"avg"===this.st.toLowerCase()&&(this.sd&&this.vd?o=this.v/this.vd:this.v&&0<d&&(o=this.v/d));try{this.groupCount=n.cnt,this.groupIndex=n.dataIndex,this.groupValue=n.value,o=j.formatter("",o,s,this)}catch(e){o=this.v}return i[p]=J.jgrid.formatCellCsv(J.jgrid.stripHtml(J.jgrid.template(a,o)),m),!1}}),p++);return i}J.each(y,function(e,t){for(var
r=0;r<g;r++)if(u.groupField[r]===t.name){c[r]=e;break}});var
F,b,v=J.makeArray(u.groupSummary);if(v.reverse(),"local"===j.p.datatype&&!j.p.loadonce){J(j).jqGrid("groupingSetup");for(var
e=J.jgrid.getMethod("groupingPrepare"),t=0;t<l;t++)e.call(J(j),r[t],t)}return J.each(u.groups,function(e,t){x++;try{F=Array.isArray(u.formatDisplayField)&&J.jgrid.isFunction(u.formatDisplayField[t.idx])?u.formatDisplayField[t.idx].call(j,t.displayValue,t.value,j.p.colModel[c[t.idx]],t.idx,u):j.formatter("",t.displayValue,c[t.idx],t.value)}catch(e){F=t.displayValue}var
r,l="";if("string"!=typeof(l=J.jgrid.isFunction(u.groupText[t.idx])?u.groupText[t.idx].call(j,F,t.cnt,t.summary):J.jgrid.template(u.groupText[t.idx],F,t.cnt,t.summary))&&"number"!=typeof
l&&(l=F),(r="header"===u.groupSummaryPos[t.idx]?I(e,0,u.groups,0):new
Array(m.collen))[0]=J.jgrid.formatCellCsv(J.jgrid.stripHtml(l),m),f+=r.join(m.separator)+m.newLine,g-1===t.idx){for(var
o,a,n,d=u.groups[e+1],l=t.startRow,i=void
0!==d?d.startRow:u.groups[e].startRow+u.groups[e].cnt,p=l;p<i&&s[+p];p++){for(a=s[+p],o=b=0;o<y.length;o++)y[o]._expcol&&(r[b]=J.jgrid.formatCellCsv(J.jgrid.formatCell(J.jgrid.getAccessor(a,y[o].name),o,a,y[o],j,"csv"),m),b++);f+=r.join(m.separator)+m.newLine}if("header"!==u.groupSummaryPos[t.idx]){if(void
0!==d){for(n=0;n<u.groupField.length&&d.dataIndex!==u.groupField[n];n++);x=u.groupField.length-n}for(o=0;o<x;o++)v[o]&&(r=I(e,o,u.groups,0),f+=r.join(m.separator)+m.newLine);x=n}}}),f}J.jgrid.isFunction(T.loadIndicator)?T.loadIndicator("show"):T.loadIndicator&&J(j).jqGrid("progressBar",{method:"show",loadtype:j.p.loadui,htmlcontent:J.jgrid.getRegional(j,"defaults.loadtext")});var
y=[];if(J.each(o,function(e,t){t._expcol=!0,void
0===t.exportcol?t.hidden&&(t._expcol=!1):t._expcol=t.exportcol,"cb"!==t.name&&"rn"!==t.name&&"subgrid"!==t.name&&"sc"!==t.name||(t._expcol=!1),t._expcol&&(u.push(J.jgrid.formatCellCsv(n[e],T)),y.push(t.name))}),T.includeLabels&&(f=u.join(T.separator)+T.newLine),T.collen=u.length,j.p.grouping){var
h=!!j.p.groupingView._locgr;j.p.groupingView._locgr=!1,i+=g(r,T),j.p.groupingView._locgr=h}else
for(;d<l;){for(e=r[d],b=[],I=t=0;I<a;I++)o[I]._expcol&&(b[t]=J.jgrid.formatCellCsv(J.jgrid.formatCell(J.jgrid.getAccessor(e,o[I].name),I,e,o[I],j,"csv"),T),t++);i+=b.join(T.separator)+T.newLine,d++}if(r=null,b=new
Array(T.collen),T.includeCaption&&j.p.caption){for(d=T.collen;--d;)b[d]="";b[0]=J.jgrid.formatCellCsv(j.p.caption,T),p+=b.join(T.separator)+T.newLine}if(T.includeGroupHeader&&J(j).jqGrid("isGroupHeaderOn"))for(var
x=j.p.groupHeader,I=0;I<x.length;I++){for(var
F=x[I].groupHeaders,d=0,b=[],v=0;v<y.length;v++){for(b[d]="",t=0;t<F.length;t++)F[t].startColumnName===y[v]&&(b[d]=J.jgrid.formatCellCsv(F[t].titleText,T));d++}s+=b.join(T.separator)+T.newLine}if(T.includeFooter&&j.p.footerrow&&J(".ui-jqgrid-ftable",this.sDiv).length){var
w=J(j).jqGrid("footerData","get");for(I=0,b=[];I<T.collen;){var
C=y[I];w.hasOwnProperty(C)&&b.push(J.jgrid.formatCellCsv(J.jgrid.stripHtml(w[C]),T)),I++}m+=b.join(T.separator)+T.newLine}if(T.includeHeader&&j.p.headerrow){var
_=J(j).jqGrid("headerData","get");for(I=0,b=[];I<T.collen;){var
B=y[I];_.hasOwnProperty(B)&&b.push(J.jgrid.formatCellCsv(J.jgrid.stripHtml(_[B]),T)),I++}c+=b.join(T.separator)+T.newLine}k=p+s+f+c+i+m,J.jgrid.isFunction(T.loadIndicator)?T.loadIndicator("hide"):T.loadIndicator&&J(j).jqGrid("progressBar",{method:"hide",loadtype:j.p.loadui})}),T.returnAsString)return k;if(-1!==T.mimetype.toUpperCase().indexOf("UTF-8")&&(k="\ufeff"+k),J.jgrid.isFunction(T.onBeforeExport)&&!(k=T.onBeforeExport(k)))throw"Before export does not return data!";J.jgrid.saveAs(k,T.fileName,{type:T.mimetype})},exportToExcel:function(W){W=J.extend(!0,{includeLabels:!0,includeGroupHeader:!0,includeFooter:!0,includeHeader:!0,fileName:"jqGridExport.xlsx",mimetype:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",maxlength:40,onBeforeExport:null,customizeData:null,replaceStr:null,treeindent:" ",visibleTreeNodes:!1,loadIndicator:!0},W||{}),this.each(function(){var
e,t,r,F=this,l=J.jgrid.excelStrings,y=0,h=J.parseXML(l["xl/worksheets/sheet1.xml"]),P=h.getElementsByTagName("sheetData")[0],o=J.parseXML(l["xl/styles.xml"]),l=(o.getElementsByTagName("numFmts")[0],o.getElementsByTagName("cellXfs")[0],{_rels:{".rels":J.parseXML(l["_rels/.rels"])},xl:{_rels:{"workbook.xml.rels":J.parseXML(l["xl/_rels/workbook.xml.rels"])},"workbook.xml":J.parseXML(l["xl/workbook.xml"]),"styles.xml":o,worksheets:{"sheet1.xml":h}},"[Content_Types].xml":J.parseXML(l["[Content_Types].xml"])}),b=F.p.colModel,a=0,v={body:F.p.treeGrid?J(F).jqGrid("getRowData",null,!0,W.treeindent,W.visibleTreeNodes):F.addLocalData(!0),header:[],footer:[],width:[],map:[],parser:[],labels:[],hidden:[],mergecell:[]},E=J.jgrid.addExcelStyle({excel_header_style:""},{fontId:"2",applyAlignment:"1"},{horizontal:"center",vertical:"center"},o).excel_header_style;for(f=0,e=b.length;f<e;f++)b[f]._expcol=!0,void
0===b[f].exportcol?b[f].hidden&&(b[f]._expcol=!1):b[f]._expcol=b[f].exportcol,void
0===b[f]._colspancell&&(b[f]._colspancell=!1),J.jgrid.isServiceCol(b[f].name)||!b[f]._expcol?v.hidden.push(b[f].name):(v.header[a]=b[f].name,v.width[a]=5,v.map[a]=f,v.labels[a]=F.p.colNames[f],b[f].hasOwnProperty("exportoptions")?(t={},r={},b[f].exportoptions.excel_format&&(t=J.jgrid.addExcelStyle({excel_format:b[f].exportoptions.excel_format,excel_style:b[f].exportoptions.excel_style||""},{},{},o)),b[f].exportoptions.excel_header_format&&(r=J.jgrid.addExcelStyle({excel_header_format:b[f].exportoptions.excel_header_format,excel_header_style:b[f].exportoptions.excel_header_style||""},{fontId:"2",applyAlignment:"1"},{horizontal:"center"},o)),v.parser[f]=J.extend(t,r),b[f].exportoptions.replace_format&&(v.parser[f].replace_format=b[f].exportoptions.replace_format),b[f].exportoptions.replace_header_format&&(v.parser[f].replace_header_format=b[f].exportoptions.replace_header_format)):v.parser[f]={excel_parsers:!0},a++);if(W.includeFooter||F.p.footerrow)for(a
in
v.footer=J(F).jqGrid("footerData","get"),v.footer)v.footer.hasOwnProperty(a)&&(v.footer[a]=J.jgrid.stripHtml(v.footer[a]));function
x(e,t){return J.jgrid.makeNode(h,"c",{attr:e,children:[J.jgrid.makeNode(h,"v",{text:t})]})}function
I(e,t,r){return J.jgrid.makeNode(h,"c",{attr:{t:"inlineStr",r:e,s:r=void
0===r?68:r},children:{row:J.jgrid.makeNode(h,"is",{children:{row:J.jgrid.makeNode(h,"t",{text:t})}})}})}J.jgrid.isFunction(W.customizeData)&&W.customizeData.call(F,v);var
j,w,O=J.jgrid.isFunction(W.replaceStr)?W.replaceStr:function(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F-\x9F]/g,"")},C=function(e,t,r,l){void
0===r&&(r=!1),void
0===l&&(l=!1),j=y+1,w=J.jgrid.makeNode(h,"row",{attr:{r:j}});for(var
o,a,n=0;n<v.header.length;n++){var
d,i,p=J.jgrid.excelCellPos(n)+""+j,s=(null==(g=Array.isArray(e)&&t?v.labels[n]:J.jgrid.getAccessor(e,v.header[n]))&&(g=""),t||(g=0===n&&l||l&&""===g?g:J.jgrid.formatCell(g,v.map[n],e,b[v.map[n]],F,"excel"))&&("&nbsp;"===g||"&#160;"===g||1===g.length&&160===g.charCodeAt(0))&&(g=""),v.width[n]=Math.max(v.width[n],Math.min(parseInt(g.toString().length,10),W.maxlength)),d=null,v.parser[v.map[n]]);if(t&&r)s.replace_header_format&&(g=s.replace_header_format(g)),d=void
0!==s.excel_header_style?"text"===s.excel_header_style?I(p,g):s.excel_header_style<=55?I(p,g,s.excel_header_style):x({r:p,s:s.excel_header_style},g):I(p,g,E),w.appendChild(d);else
if(!0!==s.excel_parsers||d)void
0===s.excel_style||t||d||(s.replace_format&&(g=s.replace_format(g)),d="text"===s.excel_style?I(p,g):s.excel_style<=55?I(p,g,s.excel_style):x({r:p,s:s.excel_style},g),w.appendChild(d));else
for(var
m=0,f=J.jgrid.excelParsers.length;m<f;m++){var
u=J.jgrid.excelParsers[m];if(g.match&&!g.match(/^0\d+/)&&g.match(u.match)){var
c=g,g=g.replace(/[^\d\.\-]/g,"");if(u.fmt&&(g=u.fmt(g)),67===u.style)d=x({t:"d",r:p,s:u.style},g);else
if(4===u.style)o=c,a=void
0,(a=document.createElement("div")).innerHTML=o,d=(g="A"===(o=a.firstChild).nodeName?[o.href,o.text]:"#text"===o.nodeName&&[o.textContent,o.textContent])?(a={t:"str",r:p,s:u.style},o='HYPERLINK("'+g[0]+'","'+g[1]+'")',J.jgrid.makeNode(h,"c",{attr:a,children:[J.jgrid.makeNode(h,"f",{text:o})]})):I(p,c);else{if(J.inArray(u.style,["63","64","65","66"])&&15<g.toString().length){d=I(p,c.replace?O(c):c),w.appendChild(d);break}d=x({r:p,s:u.style},g)}w.appendChild(d);break}}d||(g.match&&(i=g.match(/^-?([1-9]\d+)(\.(\d+))?$/)),d="number"==typeof
g&&g.toString().length<=15||i&&i[1].length+(i[2]?i[3].length:0)<=15?x({t:"n",r:p},g):I(p,g.replace?O(g):g),w.appendChild(d))}P.appendChild(w),y++};function
G(s){var
m=F.p.groupingView,f=[],u=m.groupField.length,c=b.length,g=0;function
y(e,t,r,l){for(var
o,a,n=function(e,t,r){var
l,o=!1;if(0===t)o=r[e];else{var
a=r[e].idx;if(0===a)o=r[e];else
for(l=e;0<=l;l--)if(r[l].idx===a-t){o=r[l];break}}return o}(e,t,r),d=n.cnt,i=h(v.header),p=l;p<c;p++)b[p]._expcol&&(a="{0}",J.each(n.summary,function(){if(this.nm===b[p].name){b[p].summaryTpl&&(a=b[p].summaryTpl),o=this.v,"string"==typeof
this.st&&"avg"===this.st.toLowerCase()&&(this.sd&&this.vd?o=this.v/this.vd:this.v&&0<d&&(o=this.v/d));try{this.groupCount=n.cnt,this.groupIndex=n.dataIndex,this.groupValue=n.value}catch(e){o=this.v}return i[this.nm]=J.jgrid.stripHtml(J.jgrid.template(a,o)),!1}}));return i}function
h(e){for(var
t={},r=0;r<e.length;r++)t[e[r]]="";return t}J.each(b,function(e,t){for(var
r=0;r<u;r++)if(m.groupField[r]===t.name){f[r]=e;break}});var
x,I=J.makeArray(m.groupSummary);if(I.reverse(),"local"===F.p.datatype&&!F.p.loadonce){J(F).jqGrid("groupingSetup");for(var
e=J.jgrid.getMethod("groupingPrepare"),t=0;t<v.body.length;t++)e.call(J(F),v.body[t],t)}J.each(m.groups,function(e,t){g++;try{x=Array.isArray(m.formatDisplayField)&&J.jgrid.isFunction(m.formatDisplayField[t.idx])?m.formatDisplayField[t.idx].call(F,t.displayValue,t.value,F.p.colModel[f[t.idx]],t.idx,m):F.formatter("",t.displayValue,f[t.idx],t.value)}catch(e){x=t.displayValue}var
r="",l=("string"!=typeof(r=J.jgrid.isFunction(m.groupText[t.idx])?m.groupText[t.idx].call(F,x,t.cnt,t.summary):J.jgrid.template(m.groupText[t.idx],x,t.cnt,t.summary))&&"number"!=typeof
r&&(r=x),"header"===m.groupSummaryPos[t.idx]?y(e,0,m.groups,0):h(v.header));if(l[Object.keys(l)[0]]=J.jgrid.stripHtml(new
Array(5*t.idx).join(" ")+r),C(l,!1,!1,!0),u-1===t.idx){for(var
o,a,n=m.groups[e+1],r=t.startRow,d=void
0!==n?n.startRow:m.groups[e].startRow+m.groups[e].cnt,i=r;i<d&&s[+i];i++){var
p=s[+i];C(p,!1)}if("header"!==m.groupSummaryPos[t.idx]){if(void
0!==n){for(a=0;a<m.groupField.length&&n.dataIndex!==m.groupField[a];a++);g=m.groupField.length-a}for(o=0;o<g;o++)I[o]&&(l=y(e,o,m.groups,0),C(l,!1,!1,!0));g=a}}})}J.jgrid.isFunction(W.loadIndicator)?W.loadIndicator("show"):W.loadIndicator&&J(F).jqGrid("progressBar",{method:"show",loadtype:F.p.loadui,htmlcontent:J.jgrid.getRegional(F,"defaults.loadtext")}),J("sheets sheet",l.xl["workbook.xml"]).attr("name",W.sheetName);var
n,d,i,p=0,s=[],m={},f=0;if(W.includeGroupHeader&&J(F).jqGrid("isGroupHeaderOn"))for(n=F.p.groupHeader,i=0;i<n.length;i++){var
u,c,g,_=n[i].groupHeaders,B=n[i].useColSpanStyle&&1===n.length,L=[],V=[],R=[];if(p++,B)for(u=0;u<_.length;u++)for(d=_[u].startColumnName,A=_[u].numberOfColumns,H=N=J.jgrid.getElemByAttrVal(b,"name",d,!0);H<N+_[u].numberOfColumns;H++)R[b[H].name]=d,-1!==(S=v.header.indexOf(b[H].name))&&L.push(S);for(f=0;f<v.header.length;f++){for(m[d=v.header[f]]=B?v.labels[f]:"",g=c=-1,u=0;u<_.length;u++)if(_[u].startColumnName===d){for(V.push(d),m[d]=_[u].titleText,A=_[u].numberOfColumns,H=N=J.jgrid.getElemByAttrVal(b,"name",d,!0);H<N+_[u].numberOfColumns;H++)!0===b[H].hidden&&A--;c=J.jgrid.excelCellPos(f)+p,g=J.jgrid.excelCellPos(f+A-1)+p,s.push({ref:c+":"+g})}-1===c&&-1===g&&B&&-1===L.indexOf(f)&&(c=J.jgrid.excelCellPos(f)+p,g=J.jgrid.excelCellPos(f)+(p+1),s.push({ref:c+":"+g}))}if(V.length<_.length)for(u=0;u<v.hidden.length;u++){var
T=J.jgrid.inColumnHeader(v.hidden[u],_);if(0<=T)for(var
k
in
d=v.hidden[u],R)if(R[k]===d&&m[k]){m[k]=_[T].titleText;for(var
N,S=v.header.indexOf(k),A=_[T].numberOfColumns,H=N=J.jgrid.getElemByAttrVal(b,"name",d,!0);H<N+_[T].numberOfColumns;H++)!0===b[H].hidden&&A--;c=J.jgrid.excelCellPos(S)+p,g=J.jgrid.excelCellPos(S+A-1)+p,s.push({ref:c+":"+g});break}}C(m,!0,!0)}if(W.includeLabels)if(F.p.colSpanHeader.length){for(p++,n=F.p.colSpanHeader,m={},f=0;f<v.header.length;f++)for(m[d=v.header[f]]=v.labels[f],i=0;i<n.length;i++)(_=n[i]).startColumnName===d&&(m[d]=_.titleText,c=J.jgrid.excelCellPos(f)+p,g=J.jgrid.excelCellPos(f+_.numberOfColumns-1)+p,s.push({ref:c+":"+g}));C(m,!0,!0)}else
C(v.header,!0,!0);if((s=v.mergecell.length?s.concat(v.mergecell):s).length){var
M=J.jgrid.makeNode(h,"mergeCells",{attr:{count:s.length}});for(J("worksheet",h).append(M),a=0;a<s.length;a++)M.appendChild(J.jgrid.makeNode(h,"mergeCell",{attr:s[a]}))}if(W.includeHeader||F.p.headerrow){var
D=J(F).jqGrid("headerData","get");for(a
in
D)D.hasOwnProperty(a)&&(D[a]=J.jgrid.stripHtml(D[a]));J.isEmptyObject(D)||(C(D,!0),J("row",h).last().find("c").attr("s","2"))}if(F.p.grouping){var
z=!!F.p.groupingView._locgr;F.p.groupingView._locgr=!1,G(v.body),F.p.groupingView._locgr=z}else
for(var
$=0,X=v.body.length;$<X;$++)C(v.body[$],!1);!W.includeFooter&&!F.p.footerrow||J.isEmptyObject(v.footer)||(C(v.footer,!0),J("row",h).last().find("c").attr("s","2"));var
U=J.jgrid.makeNode(h,"cols");for(J("worksheet",h).prepend(U),a=0,e=v.width.length;a<e;a++)U.appendChild(J.jgrid.makeNode(h,"col",{attr:{min:a+1,max:a+1,width:v.width[a],customWidth:1}}));J.jgrid.isFunction(W.onBeforeExport)&&W.onBeforeExport(l,y),v=null;try{var
q=new
JSZip,Z={type:"blob",mimeType:W.mimetype};J.jgrid.xmlToZip(q,l),q.generateAsync?q.generateAsync(Z).then(function(e){J.jgrid.saveAs(e,W.fileName,{type:W.mimetype})}):J.jgrid.saveAs(q.generate(Z),W.fileName,{type:W.mimetype})}catch(e){throw e}finally{J.jgrid.isFunction(W.loadIndicator)?W.loadIndicator("hide"):W.loadIndicator&&J(F).jqGrid("progressBar",{method:"hide",loadtype:F.p.loadui})}})},exportToPdf:function(T){return T=J.extend(!0,{title:null,orientation:"portrait",pageSize:"A4",description:null,onBeforeExport:null,download:"download",includeLabels:!0,includeGroupHeader:!0,includeFooter:!0,includeHeader:!0,fileName:"jqGridExport.pdf",mimetype:"application/pdf",treeindent:"-",visibleTreeNodes:!1,loadIndicator:!0},T||{}),this.each(function(){var
e,t,r,v=this,j=[],l=v.p.colModel,d={},i=v.p.treeGrid?J(v).jqGrid("getRowData",null,!0,T.treeindent,T.visibleTreeNodes):v.addLocalData(!0),w=[],p=0,C=[],o=[],a=[],_={};function
n(s){var
m=v.p.groupingView,f=[],u=m.groupField.length,c=v.p.colModel,g=c.length,y=0;function
h(e,t,r){var
l,o=0,a=[];void
0===r&&(r=!1);for(var
n=0;n<w.length;n++)l=e[w[n]],d={text:null==l||""===l?"":t&&!(0===n&&r)?J.jgrid.formatCell(l+"",C[o],i[p],c[C[o]],v,"pdf"):l,alignment:_[n],style:"tableBody"},a.push(d),o++;return a}function
x(e,t,r,l){for(var
o,a,n=function(e,t,r){var
l,o=!1;if(0===t)o=r[e];else{var
a=r[e].idx;if(0===a)o=r[e];else
for(l=e;0<=l;l--)if(r[l].idx===a-t){o=r[l];break}}return o}(e,t,r),d=n.cnt,i=I(w),p=l;p<g;p++)c[p]._expcol&&(a="{0}",J.each(n.summary,function(){if(this.nm===c[p].name){c[p].summaryTpl&&(a=c[p].summaryTpl),o=this.v,"string"==typeof
this.st&&"avg"===this.st.toLowerCase()&&(this.sd&&this.vd?o=this.v/this.vd:this.v&&0<d&&(o=this.v/d));try{this.groupCount=n.cnt,this.groupIndex=n.dataIndex,this.groupValue=n.value}catch(e){o=this.v}return i[this.nm]=J.jgrid.stripHtml(J.jgrid.template(a,o)),!1}}));return i}function
I(e){for(var
t={},r=0;r<e.length;r++)t[e[r]]="";return t}J.each(c,function(e,t){for(var
r=0;r<u;r++)if(m.groupField[r]===t.name){f[r]=e;break}});var
F,b=J.makeArray(m.groupSummary);if(b.reverse(),"local"===v.p.datatype&&!v.p.loadonce){J(v).jqGrid("groupingSetup");for(var
e=J.jgrid.getMethod("groupingPrepare"),t=0;t<i.length;t++)e.call(J(v),i[t],t)}J.each(m.groups,function(e,t){y++;try{F=Array.isArray(m.formatDisplayField)&&J.jgrid.isFunction(m.formatDisplayField[t.idx])?m.formatDisplayField[t.idx].call(v,t.displayValue,t.value,v.p.colModel[f[t.idx]],t.idx,m):v.formatter("",t.displayValue,f[t.idx],t.value)}catch(e){F=t.displayValue}var
r="",l=("string"!=typeof(r=J.jgrid.isFunction(m.groupText[t.idx])?m.groupText[t.idx].call(v,F,t.cnt,t.summary):J.jgrid.template(m.groupText[t.idx],F,t.cnt,t.summary))&&"number"!=typeof
r&&(r=F),"header"===m.groupSummaryPos[t.idx]?x(e,0,m.groups,0):I(w));if(l[Object.keys(l)[0]]=J.jgrid.stripHtml(new
Array(5*t.idx).join(" ")+r),j.push(h(l,!0,!0)),u-1===t.idx){for(var
o,a,n=m.groups[e+1],r=t.startRow,d=void
0!==n?n.startRow:m.groups[e].startRow+m.groups[e].cnt,i=r;i<d&&s[+i];i++){var
p=s[+i];j.push(h(p,!0))}if("header"!==m.groupSummaryPos[t.idx]){if(void
0!==n){for(a=0;a<m.groupField.length&&n.dataIndex!==m.groupField[a];a++);y=m.groupField.length-a}for(o=0;o<y;o++)b[o]&&(l=x(e,o,m.groups,0),j.push(h(l,!0,!0)));y=a}}})}for(J.jgrid.isFunction(T.loadIndicator)?T.loadIndicator("show"):T.loadIndicator&&J(v).jqGrid("progressBar",{method:"show",loadtype:v.p.loadui,htmlcontent:J.jgrid.getRegional(v,"defaults.loadtext")}),e=0,F=l.length;e<F;e++)l[e]._expcol=!0,void
0===l[e].exportcol?l[e].hidden&&(l[e]._expcol=!1):l[e]._expcol=l[e].exportcol,!J.jgrid.isServiceCol(l[e].name)&&l[e]._expcol&&(d={text:v.p.colNames[e],style:"tableHeader"},o.push(d),w[p]=l[e].name,C[p]=e,a.push(l[e].width),_[l[e].name]=l[e].align||"left",p++);if(T.includeGroupHeader&&J(v).jqGrid("isGroupHeaderOn"))for(r=v.p.groupHeader,p=0;p<r.length;p++){for(var
s=[],m=r[p].groupHeaders,f=r[p].useColSpanStyle,u=0;u<l.length;u++){var
c=!0;for(J.jgrid.isServiceCol(l[u].name)||!l[u]._expcol?c=!1:d=f?{text:v.p.colNames[u],style:"tableHeader",rowSpan:2,verticalAlign:"center"}:{text:"",style:"tableHeader"},t=0;t<m.length;t++)if(m[t].startColumnName===l[u].name){for(var
g=m[t].numberOfColumns,y=u;y<u+m[t].numberOfColumns;y++)!0===l[y].hidden&&g--;!(d={text:m[t].titleText,colSpan:g,style:"tableHeader"})===c&&0<g&&(c=!0,u+=m[t].numberOfColumns-g)}c&&s.push(d)}j.push(s)}if(T.includeLabels)if(v.p.colSpanHeader.length){for(r=v.p.colSpanHeader,s=[],u=0;u<w.length;u++){for(d={text:v.p.colNames[u],style:"tableHeader",verticalAlign:"center"},t=0;t<r.length;t++)r[t].startColumnName===w[u]&&(d={text:r[t].titleText,colSpan:r[t].numberOfColumns,style:"tableHeader"});s.push(d),e++}j.push(s)}else
j.push(o);if(T.includeHeader&&v.p.headerrow){var
h=J(v).jqGrid("headerData","get"),o=[];for(u=0;u<w.length;u++)d={text:J.jgrid.stripHtml(J.jgrid.getAccessor(h,w[u])),style:"tableFooter",alignment:_[w[u]]},o.push(d);j.push(o)}if(v.p.grouping){var
x=!!v.p.groupingView._locgr;v.p.groupingView._locgr=!1,n(i),v.p.groupingView._locgr=x}else
for(var
I,p=0,F=i.length;p<F;p++){for(o=[],I=i[p],u=t=0;u<w.length;u++)d={text:null==I[w[u]]?"":J.jgrid.stripHtml(J.jgrid.formatCell(J.jgrid.getAccessor(I,w[u])+"",C[t],i[p],l[C[t]],v,"pdf")),alignment:_[w[u]],style:"tableBody"},o.push(d),t++;j.push(o)}if(T.includeFooter&&v.p.footerrow){var
b=J(v).jqGrid("footerData","get");for(o=[],u=0;u<w.length;u++)d={text:J.jgrid.stripHtml(J.jgrid.getAccessor(b,w[u])),style:"tableFooter",alignment:_[w[u]]},o.push(d);j.push(o)}x={pageSize:T.pageSize,pageOrientation:T.orientation,content:[{style:"tableExample",widths:a,table:{headerRows:null!=r?0:1,body:j}}],styles:{tableHeader:{bold:!0,fontSize:11,color:"#2e6e9e",fillColor:"#dfeffc",alignment:"center"},tableBody:{fontSize:10},tableFooter:{bold:!0,fontSize:11,color:"#2e6e9e",fillColor:"#dfeffc"},title:{alignment:"center",fontSize:15},description:{}},defaultStyle:{fontSize:10}};T.description&&x.content.unshift({text:T.description,style:"description",margin:[0,0,0,12]}),T.title&&x.content.unshift({text:T.title,style:"title",margin:[0,0,0,12]}),J.jgrid.isFunction(T.onBeforeExport)&&T.onBeforeExport.call(v,x);try{var
B=pdfMake.createPdf(x);B.getDataUrl(function(e){J.jgrid.isFunction(T.loadIndicator)?T.loadIndicator("hide"):T.loadIndicator&&J(v).jqGrid("progressBar",{method:"hide",loadtype:v.p.loadui})}),"open"===T.download?B.open():B.getBuffer(function(e){J.jgrid.saveAs(e,T.fileName,{type:T.mimetype})})}catch(e){throw e}})},exportToHtml:function(s){var
f;return s=J.extend(!0,{title:"",onBeforeExport:null,includeLabels:!0,includeGroupHeader:!0,includeFooter:!0,includeHeader:!0,tableClass:"jqgridprint",autoPrint:!1,topText:"",bottomText:"",returnAsString:!1,treeindent:"&nbsp;",visibleTreeNodes:!1,loadIndicator:!0},s||{}),this.each(function(){var
v=this,m=v.p.colModel,e=0,j={body:v.p.treeGrid?J(v).jqGrid("getRowData",null,!0,s.treeindent,s.visibleTreeNodes):v.addLocalData(!0),header:[],footer:[],width:[],map:[],align:[]},t=0;for(d=m.length;t<d;t++)m[t]._expcol=!0,void
0===m[t].exportcol?m[t].hidden&&(m[t]._expcol=!1):m[t]._expcol=m[t].exportcol,"cb"!==m[t].name&&"rn"!==m[t].name&&"subgrid"!==m[t].name&&"sc"!==m[t].name&&m[t]._expcol&&(j.header[e]=m[t].name,j.width[e]=m[t].width,j.map[e]=t,j.align[e]=m[t].align||"left",e++);var
r=document.createElement("a"),l=function(e){r.href=e;e=r.host;return-1===e.indexOf("/")&&0!==r.pathname.indexOf("/")&&(e+="/"),r.protocol+"//"+e+r.pathname+r.search},w=function(e,t,r,l,o){for(var
a,n,d="<tr>",i=0,p=j.header.length;i<p&&(n=o?' colspan= "'+j.header.length+'" style=text-align:left':!0===l?" style=width:"+j.width[i]+"px;text-align:"+j.align[i]+";":" style=text-align:"+j.align[i]+";",a=j.header[i],e.hasOwnProperty(a)&&(d+="<"+t+n+">"+(r?J.jgrid.formatCell(J.jgrid.getAccessor(e,a),j.map[i],e,m[j.map[i]],v,"html"):e[a])+"</"+t+">"),!o);i++);return d+"</tr>"};function
o(f){var
u=v.p.groupingView,c=[],g=u.groupField.length,s=m.length,y=0,h="";function
x(e,t,r,l){for(var
o,a,n=function(e,t,r){var
l,o=!1;if(0===t)o=r[e];else{var
a=r[e].idx;if(0===a)o=r[e];else
for(l=e;0<=l;l--)if(r[l].idx===a-t){o=r[l];break}}return o}(e,t,r),d=n.cnt,i=I(j.header),p=l;p<s;p++)m[p]._expcol&&(a="{0}",J.each(n.summary,function(){if(this.nm===m[p].name){m[p].summaryTpl&&(a=m[p].summaryTpl),o=this.v,"string"==typeof
this.st&&"avg"===this.st.toLowerCase()&&(this.sd&&this.vd?o=this.v/this.vd:this.v&&0<d&&(o=this.v/d));try{this.groupCount=n.cnt,this.groupIndex=n.dataIndex,this.groupValue=n.value}catch(e){o=this.v}return i[this.nm]=J.jgrid.stripHtml(J.jgrid.template(a,o)),!1}}));return i}function
I(e){for(var
t={},r=0;r<e.length;r++)t[e[r]]="";return t}J.each(m,function(e,t){for(var
r=0;r<g;r++)if(u.groupField[r]===t.name){c[r]=e;break}});var
F,b=J.makeArray(u.groupSummary);if(b.reverse(),"local"===v.p.datatype&&!v.p.loadonce){J(v).jqGrid("groupingSetup");for(var
e=J.jgrid.getMethod("groupingPrepare"),t=0;t<j.body.length;t++)e.call(J(v),j.body[t],t)}return J.each(u.groups,function(e,t){y++;try{F=Array.isArray(u.formatDisplayField)&&J.jgrid.isFunction(u.formatDisplayField[t.idx])?u.formatDisplayField[t.idx].call(v,t.displayValue,t.value,v.p.colModel[c[t.idx]],t.idx,u):v.formatter("",t.displayValue,c[t.idx],t.value)}catch(e){F=t.displayValue}var
r="";"string"!=typeof(r=J.jgrid.isFunction(u.groupText[t.idx])?u.groupText[t.idx].call(v,F,t.cnt,t.summary):J.jgrid.template(u.groupText[t.idx],F,t.cnt,t.summary))&&"number"!=typeof
r&&(r=F);var
l,o=!1,a=("header"===u.groupSummaryPos[t.idx]?l=x(e,0,u.groups,0):(l=I(j.header),o=!0),Object.keys(l));if(l[a[0]]=new
Array(5*t.idx).join(" ")+r,h+=w(l,"td",!0,1===y,o),g-1===t.idx){for(var
n,d,i=u.groups[e+1],a=t.startRow,p=void
0!==i?i.startRow:u.groups[e].startRow+u.groups[e].cnt,s=a;s<p&&f[+s];s++){var
m=f[+s];h+=w(m,"td",!0)}if("header"!==u.groupSummaryPos[t.idx]){if(void
0!==i){for(d=0;d<u.groupField.length&&i.dataIndex!==u.groupField[d];d++);y=u.groupField.length-d}for(n=0;n<y;n++)b[n]&&(l=x(e,n,u.groups,0),h+=w(l,"td",!0));y=d}}}),h}J.jgrid.isFunction(s.loadIndicator)?s.loadIndicator("show"):s.loadIndicator&&J(v).jqGrid("progressBar",{method:"show",loadtype:v.p.loadui,htmlcontent:J.jgrid.getRegional(v,"defaults.loadtext")});var
a='<table class="'+s.tableClass+'">';if(s.includeLabels&&(a+="<thead>"+function(e,t,r){for(var
l="<tr>",o=0,a=e.length;o<a;o++)l+="<"+t+(!0===r?" style=width:"+j.width[o]+"px;":"")+">"+v.p.colNames[j.map[o]]+"</"+t+">";return l+"</tr>"}(j.header,"th",!0)+"</thead>"),a+="<tbody>",s.includeHeader&&v.p.headerrow&&(n=J(v).jqGrid("headerData","get",null,!1),a+=w(n,"td",!1)),v.p.grouping){var
n=!!v.p.groupingView._locgr;v.p.groupingView._locgr=!1,a+=o(j.body),v.p.groupingView._locgr=n}else
for(var
e=0,d=j.body.length;e<d;e++)a+=w(j.body[e],"td",!0,0===e);if(s.includeFooter&&v.p.footerrow&&(j.footer=J(v).jqGrid("footerData","get",null,!1),a+=w(j.footer,"td",!1)),a=a+"</tbody>"+"</table>",s.returnAsString)f=a;else{var
i=window.open("",""),p=(i.document.close(),s.title?"<title>"+s.title+"</title>":"");J("style, link").each(function(){p+=function(e){e=J(e).clone()[0];return"link"===e.nodeName.toLowerCase()&&(e.href=l(e.href)),e.outerHTML}(this)});try{i.document.head.innerHTML=p}catch(e){J(i.document.head).html(p)}i.document.body.innerHTML=(s.title?"<h1>"+s.title+"</h1>":"")+"<div>"+(s.topText||"")+"</div>"+a+"<div>"+(s.bottomText||"")+"</div>",J(i.document.body).addClass("html-view"),J("img",i.document.body).each(function(e,t){t.setAttribute("src",l(t.getAttribute("src")))}),s.onBeforeExport&&s.onBeforeExport(i),Boolean(i.chrome)?s.autoPrint&&(i.print(),i.close()):setTimeout(function(){s.autoPrint&&(i.print(),i.close())},1e3)}J.jgrid.isFunction(s.loadIndicator)?s.loadIndicator("hide"):s.loadIndicator&&J(v).jqGrid("progressBar",{method:"hide",loadtype:v.p.loadui})}),f}})});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.base"],e):e(jQuery)}(function(v){"use strict";v.extend(v.jgrid,{focusableElementsList:[">a[href]",">button:not([disabled])",">area[href]",">input:not([disabled])",">select:not([disabled])",">textarea:not([disabled])",">iframe",">object",">embed",">*[tabindex]",">*[contenteditable]"]}),v.jgrid.extend({ariaBodyGrid:function(e){var
f=v.extend({onEnterCell:null,onKeyCheck:null,customCellAction:null},e||{});return this.each(function(){var
a=this,t=v.jgrid.getMethod("getStyleUI"),l=t(a.p.styleUI+".common","highlight",!0);function
n(e,i){return!isNaN(e)&&!isNaN(i)&&0<=e&&0<=i&&a.rows.length&&e<a.rows.length&&i<a.p.colModel.length}function
r(e,i){var
t,i=a.p.iRow+i,r=a.p.iCol+e,o=a.rows.length,e=0!==e;return!!o&&(t=a.p.colModel.length,e&&(r<0&&2<=i&&(r=t-1,i--),t<=r)&&(r=0,i++),e||(i<1?(r--,a.rows[i=o-1]&&0<=r&&!a.rows[i].cells[r]&&i--):(o<=i||!a.rows[i].cells[r])&&(i=1,r++)),n(i,r)?{row:i,col:r}:!!n(a.p.iRow,a.p.iCol)&&{row:a.p.iRow,col:a.p.iCol})}function
o(e,i){var
t=r(e,i);if(!t)return!1;for(;v(a.rows[t.row].cells[t.col]).is(":hidden");)if(a.p.iRow=t.row,a.p.iCol=t.col,t=r(e,i),a.p.iRow===t.row&&a.p.iCol===t.col)return!1;return 0!==i&&v(a).jqGrid("setSelection",a.rows[t.row].id,!1,null,!1),t}function
d(e){var
i=a.p.page,t=a.p.lastpage;a.p.page!==(i=t<(i=(i+=e)<=0?1:i)?t:i)&&(a.p.page=i,a.grid.populate())}var
i=v.jgrid.focusableElementsList.join();v(a).removeAttr("tabindex"),v(a).on("jqGridAfterGridComplete.setAriaGrid",function(e){v("tbody",a).first().find(">tr:not(.jqgfirstrow)>td:not(:hidden, :has("+i+"))").attr("tabindex",-1),v("tbody",a).first().find(">tr:not(.jqgfirstrow)").removeAttr("tabindex"),void
0!==a.p.iRow&&void
0!==a.p.iCol&&a.rows[a.p.iRow]&&v(a.rows[a.p.iRow].cells[a.p.iCol]).attr("tabindex",0).focus(function(){v(this).addClass(l)}).blur(function(){v(this).removeClass(l)})}),a.p.iRow=1,a.p.iCol=v.jgrid.getFirstVisibleCol(a);var
s=0,c=0,p=!!v.jgrid.isFunction(f.customCellAction)&&f.customCellAction,u=!!v.jgrid.isFunction(f.onKeyCheck)&&f.onKeyCheck;v(a).on("keydown",function(e){if((!a.p.navigationDisabled||!0!==a.p.navigationDisabled)&&!e.target.id.startsWith("jqs_"+a.p.id)&&(!u||u.call(a,a.rows[a.p.iRow].id,a.p.iRow,a.p.iCol,e))){var
i;switch(e.which||e.keyCode){case
38:i=o(0,-1),s=i.row,c=i.col,e.preventDefault();break;case
40:i=o(0,1),s=i.row,c=i.col,e.preventDefault();break;case
37:i=o(-1,0),s=i.row,c=i.col,e.preventDefault();break;case
39:i=o(1,0),s=i.row,c=i.col,e.preventDefault();break;case
36:s=e.ctrlKey?1:a.p.iRow,c=0,e.preventDefault();break;case
35:s=e.ctrlKey?a.rows.length-1:a.p.iRow,c=a.p.colModel.length-1,e.preventDefault();break;case
33:d(-1),c=a.p.iCol,s=a.p.iRow,e.preventDefault();break;case
34:d(1),c=a.p.iCol,(s=a.p.iRow)>a.rows.length-1&&(s=a.rows.length-1,a.p.iRow=a.rows.length-1),e.preventDefault();break;case
13:return void(v.jgrid.isFunction(f.onEnterCell)&&(f.onEnterCell.call(a,a.rows[a.p.iRow].id,a.p.iRow,a.p.iCol,e),e.preventDefault()));case
113:try{v(a).jqGrid("editCell",a.p.iRow,a.p.iCol,!0,e)}catch(e){}default:return void(p&&p.call(a,a.rows[a.p.iRow].id,a.p.iRow,a.p.iCol,e))}v(a).jqGrid("focusBodyCell",s,c,t,l)}}),v(a).on("jqGridBeforeSelectRow.ariaGridClick",function(){return!1}),v(a).on("jqGridCellSelect.ariaGridClick",function(e,i,t,r,o){var
n,o=o.target;0<a.p.iRow&&0<=a.p.iCol&&v(a.rows[a.p.iRow].cells[a.p.iCol]).attr("tabindex",-1),(v(o).is("td")||v(o).is("th")||o.id.startsWith("jqs_"+a.p.id))&&(a.p.iCol=o.cellIndex,n=v(o).closest("tr.jqgrow"),a.p.iRow=n[0].rowIndex,v(o).attr("tabindex",0).addClass(l).focus().blur(function(){v(this).removeClass(l)}))}),a.p.ariaBody=!0})},excelLikeGrid:function(e){var
b=v.extend({beforeDeleteCell:null,customCellAction:null,customUndoFunction:null,specialChars:["~","!","@","#","$","%","^","&","*","(",")","_","+","{","}",":",'"',"|","<",">","?",",",".","/",";","\\","[","]"],addonChars:!1,onKeyCheck:null},e||{});return this.each(function(){var
a=this,l=v.jgrid.getMethod("getStyleUI"),d=l(a.p.styleUI+".common","highlight",!0);function
n(e,i){return!isNaN(e)&&!isNaN(i)&&0<=e&&0<=i&&a.rows.length&&e<a.rows.length&&i<a.p.colModel.length}function
r(e,i){var
i=a.p.iRow+i,t=a.p.iCol+e,r=a.rows.length,e=0!==e,o=a.p.frozenColumns?a.p.frozenColCount+1:0;return!!r&&(r=a.p.colModel.length,e&&(t=t<o?o:t)===r&&(t=r),e||a.rows[i]&&0<=t&&!a.rows[i].cells[t]&&i--,n(i,t)?{row:i,col:t}:!!n(a.p.iRow,a.p.iCol)&&{row:a.p.iRow,col:a.p.iCol})}function
s(e,i){var
t=r(e,i);if(!t)return!1;for(;v(a.rows[t.row].cells[t.col]).is(":hidden");)if(a.p.iRow=t.row,a.p.iCol=t.col,t=r(e,i),a.p.iRow===t.row&&a.p.iCol===t.col)return!1;return 0!==i&&v(a).jqGrid("setSelection",a.rows[t.row].id,!1,null,!1),t}function
c(e){var
i=a.p.page,t=a.p.lastpage;a.p.page!==(i=t<(i=(i+=e)<=0?1:i)?t:i)&&(a.p.page=i,a.grid.populate())}a.p.F2key=!1;var
i=v.jgrid.focusableElementsList.join();v(a).removeAttr("tabindex"),v(a).on("jqGridAfterGridComplete.setAriaGrid",function(e){v("tbody",a).first().find(">tr:not(.jqgfirstrow)>td:not(:hidden, :has("+i+"))").attr("tabindex",-1),v("tbody",a).first().find(">tr:not(.jqgfirstrow)").removeAttr("tabindex"),void
0!==a.p.iRow&&void
0!==a.p.iCol&&a.rows[a.p.iRow]&&v(a.rows[a.p.iRow].cells[a.p.iCol]).attr("tabindex",0).focus(function(){v(this).addClass(d)}).blur(function(){v(this).removeClass(d)})}),a.p.iRow=1,a.p.iCol=v.jgrid.getFirstVisibleCol(a),a.p.ariaBody=!0;var
p=0,u=0,f=!!v.jgrid.isFunction(b.customCellAction)&&b.customCellAction,h=!!v.jgrid.isFunction(b.beforeDeleteCell)&&b.beforeDeleteCell,w=new
Set(b.specialChars),g=!1,C=(a.addEventListener("paste",function(e){g&&(e=(e.clipboardData||window.clipboardData).getData("text"),v(a).jqGrid("saveCell",a.p.iRow,a.p.iCol,e),g=!1)}),!!v.jgrid.isFunction(b.onKeyCheck)&&b.onKeyCheck);v(a).on("keydown",function(e){if((!a.p.navigationDisabled||!0!==a.p.navigationDisabled)&&!e.target.id.startsWith("jqs_"+a.p.id)&&(!C||C.call(a,a.rows[a.p.iRow].id,a.p.iRow,a.p.iCol,e))){var
i=e.which||e.keyCode,t=e.ctrlKey||17===i;switch(i){case
38:r=s(0,-1),p=r.row,u=r.col,e.preventDefault();break;case
40:case
13:r=s(0,1),p=r.row,u=r.col,e.preventDefault();break;case
37:r=s(-1,0),p=r.row,u=r.col,e.preventDefault();break;case
39:r=s(1,0),p=r.row,u=r.col,e.preventDefault();break;case
36:p=e.ctrlKey?1:a.p.iRow,u=a.p.frozenColumns?a.p.frozenColCount+1:0,e.preventDefault();break;case
35:p=e.ctrlKey?a.rows.length-1:a.p.iRow,u=a.p.colModel.length-1,e.preventDefault();break;case
33:c(-1),u=a.p.iCol,p=a.p.iRow,e.preventDefault();break;case
34:c(1),u=a.p.iCol,(p=a.p.iRow)>a.rows.length-1&&(p=a.rows.length-1,a.p.iRow=a.rows.length-1),e.preventDefault();break;case
9:r=e.shiftKey?s(-1,0):s(1,0),p=r.row,u=r.col,e.preventDefault();break;case
113:try{v(a).jqGrid("editCell",a.p.iRow,a.p.iCol,!0,e,!1),a.p.F2key=!0}catch(e){}break;case
8:case
46:var
r=!0;!0===(r=h?h.call(a,a.rows[a.p.iRow].id,a.p.iRow,a.p.iCol,e):r)&&v(a).jqGrid("saveCell",a.p.iRow,a.p.iCol,"");break;case
86:if(t)return g=!0;case
90:if(t)return r=!0,(r=v.jgrid.isFunction(b.customUndoFunction)?b.customUndoFunction.call(a,a.rows[a.p.iRow].id,a.p.iRow,a.p.iCol,e):r)&&a.p.savedValues&&v(a).jqGrid("getCell",a.rows[a.p.iRow].id,a.p.colModel[a.p.iCol].name,!1)===a.p.savedValues.newvalue&&a.p.iRow===a.p.savedValues.indexRow&&v(a).jqGrid("saveCell",a.p.iRow,a.p.iCol,a.p.savedValues.oldvalue),!0;default:var
r=/^[a-z]$/i.test(e.key),o=/^[0-9]$/i.test(e.key),n=!1;return b.addonChars&&(n=b.addonChars.test(e.key)),(r||o||w.has(e.key)||n)&&v(a).jqGrid("editCell",a.p.iRow,a.p.iCol,!0,e,!0),void(f&&f.call(a,a.rows[a.p.iRow].id,a.p.iRow,a.p.iCol,e))}v(a).jqGrid("focusBodyCell",p,u,l,d)}}),v(a).on("jqGridBeforeSelectRow.ariaGridClick",function(){return!1}),v(a).on("jqGridCellSelect.ariaGridClick",function(e,i,t,r,o){var
n,o=o.target;0<a.p.iRow&&0<=a.p.iCol&&v(a.rows[a.p.iRow].cells[a.p.iCol]).attr("tabindex",-1),(v(o).is("td")||v(o).is("th")||o.id.startsWith("jqs_"+a.p.id))&&(a.p.iCol=o.cellIndex,a.p.savedRow.length&&v(a).jqGrid("saveCell",a.p.savedRow[0].id,a.p.savedRow[0].ic),n=v(o).closest("tr.jqgrow"),a.p.iRow=n[0].rowIndex,v(o).attr("tabindex",0).addClass(d).focus().blur(function(){v(this).removeClass(d)}))}).on("jqGridDblClickRow.ariaGridDblClick",function(e,i,t,r,o){v(a).jqGrid("editCell",t,r,!0,o,!1),a.p.F2key=!0})})},focusBodyCell:function(a,l,d,s){return this.each(function(){var
e,i=this,t=d||v.jgrid.getMethod("getStyleUI"),r=s||t(i.p.styleUI+".common","highlight",!0),o=v.jgrid.focusableElementsList.join();function
n(e){return v(o,e)[0]}void
0!==a&&void
0!==l?!isNaN(i.p.iRow)&&!isNaN(i.p.iCol)&&0<=i.p.iCol&&(e=n(i.rows[i.p.iRow].cells[i.p.iCol]),v(e||i.rows[i.p.iRow].cells[i.p.iCol]).attr("tabindex",-1)):(a=i.p.iRow,l=i.p.iCol),a=parseInt(a,10),l=parseInt(l,10),0<a&&0<=l&&(e=n(i.rows[a].cells[l]),v(e||i.rows[a].cells[l]).attr("tabindex",0).addClass(r).focus().blur(function(){v(this).removeClass(r)}),i.p.iRow=a,i.p.iCol=l)})},resetAriaBody:function(){return this.each(function(){var
i=this,t=!1,e=(i.p.ariaBody=!1,v(i).attr("tabindex","0").off("keydown").off("jqGridBeforeSelectRow.ariaGridClick").off("jqGridCellSelect.ariaGridClick").off("jqGridAfterGridComplete.setAriaGrid"),v.jgrid.focusableElementsList.join());v("tbody",i).first().find(">tr:not(.jqgfirstrow)>td:not(:hidden, :has("+e+"))").removeAttr("tabindex").off("focus"),v("tbody",i).first().find(">tr:not(.jqgfirstrow)").attr("tabindex",-1);try{i.removeEventListener("paste",function(e){t&&(e=(e.clipboardData||window.clipboardData).getData("text"),v(i).jqGrid("saveCell",i.p.iRow,i.p.iCol,e),t=!1)},!0)}catch(e){}})},ariaHeaderGrid:function(e){var
t=v.extend({onHeaderKeyCheck:null},e||{});return this.each(function(){var
o=this,e=v.jgrid.getMethod("getStyleUI")(o.p.styleUI+".common","highlight",!0),i=v("#gbox_"+o.p.id).find(".ui-jqgrid-hbox>table").first(),n=!!v.jgrid.isFunction(t.onHeaderKeyCheck)&&t.onHeaderKeyCheck;v("tr.ui-jqgrid-labels",i).on("keydown",function(e){var
i=o.p.selHeadInd,t=e.which||e.keyCode,r=o.grid.headers.length;if(!n||n.call(o,i,e))switch(t){case
37:if(0<=i-1){for(i--;v(o.grid.headers[i].el).is(":hidden")&&0<=i-1&&!(--i<0););0<=i&&(v(o.grid.headers[i].el).focus(),v(o.grid.headers[o.p.selHeadInd].el).attr("tabindex","-1"),o.p.selHeadInd=i,e.preventDefault())}break;case
39:if(i+1<r){for(i++;v(o.grid.headers[i].el).is(":hidden")&&i+1<r&&!(r-1<++i););i<r&&(v(o.grid.headers[i].el).focus(),v(o.grid.headers[o.p.selHeadInd].el).attr("tabindex","-1"),o.p.selHeadInd=i,e.preventDefault())}break;case
13:v(o.grid.headers[i].el).find("div").first().trigger("click"),e.preventDefault();break;default:return}}),v("tr.ui-jqgrid-labels>th:not(:hidden)",i).attr("tabindex",-1).focus(function(){v(this).addClass(e).attr("tabindex","0")}).blur(function(){v(this).removeClass(e)}),o.p.selHeadInd=v.jgrid.getFirstVisibleCol(o),v(o.grid.headers[o.p.selHeadInd].el).attr("tabindex","0")})},focusHeaderCell:function(i){return this.each(function(){var
e=this;0<=(i=void
0===i?e.p.selHeadInd:i)&&i<e.p.colModel.length&&(v(e.grid.headers[e.p.selHeadInd].el).attr("tabindex","-1"),v(e.grid.headers[i].el).focus(),e.p.selHeadInd=i)})},resetAriaHeader:function(){return this.each(function(){var
e=v("#gbox_"+this.p.id).find(".ui-jqgrid-hbox>table").first();v("tr.ui-jqgrid-labels",e).off("keydown"),v("tr.ui-jqgrid-labels>th:not(:hidden)",e).removeAttr("tabindex").off("focus blur")})},ariaPagerGrid:function(){return this.each(function(){var
r=this,e=v.jgrid.getMethod("getStyleUI"),i=e(r.p.styleUI+".common","highlight",!0),o="."+e(r.p.styleUI+".common","disabled",!0),n=v(".ui-pg-button",r.p.pager),a=n.length;n.attr("tabindex","-1").focus(function(){v(this).addClass(i)}).blur(function(){v(this).removeClass(i)}),r.p.navIndex=0,setTimeout(function(){var
e=n.not(o).first().attr("tabindex","0");r.p.navIndex=e[0]&&e[0].cellIndex?e[0].cellIndex-1:0},100),v(r.p.pager).find("table.ui-pager-table tr").first().on("keydown",function(e){var
i=e.which||e.keyCode,t=r.p.navIndex;switch(i){case
37:if(0<=t-1){for(t--;v(n[t]).is(o)&&0<=t-1&&!(--t<0););0<=t&&(v(n[r.p.navIndex]).attr("tabindex","-1"),v(n[t]).attr("tabindex","0").focus(),r.p.navIndex=t),e.preventDefault()}break;case
39:if(t+1<a){for(t++;v(n[t]).is(o)&&t+1<a+1&&!(a-1<++t););t<a&&(v(n[r.p.navIndex]).attr("tabindex","-1"),v(n[t]).attr("tabindex","0").focus(),r.p.navIndex=t),e.preventDefault()}break;case
13:v(n[t]).trigger("click"),e.preventDefault();break;default:return}})})},focusPagerCell:function(t){return this.each(function(){var
e=v(".ui-pg-button",this.p.pager),i=e.length;0<=(t=void
0===t?this.p.navIndex:t)&&t<i&&(v(e[this.p.navIndex]).attr("tabindex","-1"),v(e[t]).attr("tabindex","0").focus(),this.p.navIndex=t)})},resetAriaPager:function(){return this.each(function(){v(".ui-pg-button",this.p.pager).removeAttr("tabindex").off("focus"),v(this.p.pager).find("table.ui-pager-table tr").first().off("keydown")})},setAriaGrid:function(e){var
i=v.extend({header:!0,body:!0,pager:!0,onEnterCell:null,customCellAction:null,excel:!1},e||{});return this.each(function(){i.header&&v(this).jqGrid("ariaHeaderGrid",i),i.body&&(i.excel?v(this).jqGrid("excelLikeGrid",i):v(this).jqGrid("ariaBodyGrid",i)),i.pager&&v(this).jqGrid("ariaPagerGrid")})},resetAriaGrid:function(e){var
i=v.extend({header:!0,body:!0,pager:!0},e||{});return this.each(function(){i.body&&v(this).jqGrid("resetAriaBody"),i.header&&v(this).jqGrid("resetAriaHeader"),i.pager&&v(this).jqGrid("resetAriaPager")})}})});!function(e){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.base"],e):e(jQuery)}(function(u){"use strict";u.jgrid.extend({transposeSetup:function(s,e){var
i=[],l=[],d=!1,c=u.extend({},e||{});return this.each(function(){var
e,r,o=Object.keys(s[c.baseindex]);c.excludeSrcCols.length&&(o=o.filter(function(e){return!c.excludeSrcCols.includes(e)}));for(var
a=0;a<o.length;a++){r=0,(e={}).col_name=o[a],d||i.push({name:"col_name"}),r++;for(var
n=0;n<s.length;n++){var
t=s[n];e[c.nameprefix+r]=t[o[a]],d||i.push({name:c.nameprefix+r,label:c.labelprefix+r}),r++}d=!0,l.push(e)}}),{colModel:i,rows:l}},jqTranspose:function(o,i,l,a){return i=u.extend({nameprefix:"col",labelprefix:"value ",baseindex:0,beforeCreateGrid:null,RowAsHeader:0,loadMsg:!1,excludeSrcCols:[]},i||{}),this.each(function(){var
s=this,e=l&&l.regional?l.regional:"en";function
r(e,r){Array.isArray(e)||(e=[]);var
o=jQuery(s).jqGrid("transposeSetup",e,i);if(u.jgrid.isFunction(i.beforeCreateGrid)&&i.beforeCreateGrid.call(s,o,e),!1!==r.RowAsHeader&&0<=r.RowAsHeader&&o.rows.length&&r.RowAsHeader<o.rows.length){var
a,n=o.rows[r.RowAsHeader],t=0;for(a
in
n)n.hasOwnProperty(a)&&(o.colModel[t].label=n[a]),t++;o.rows.splice(r.RowAsHeader,1)}e=u.jgrid.from.call(s,o.rows);jQuery(s).jqGrid(u.extend(!0,{datastr:e.select(),datatype:"jsonstring",colModel:o.colModel,jsonReader:{repeatitems:!1},viewrecords:!0},l||{})),i.loadMsg&&u(".loading_pivot").remove()}i.loadMsg&&u("<div class='loading_pivot ui-state-default ui-state-active row'>"+u.jgrid.getRegional(s,"regional."+e+".defaults.loadtext")+"</div>").insertBefore(s).show(),"string"==typeof
o?u.ajax(u.extend({url:o,dataType:"json",success:function(e){r(u.jgrid.getAccessor(e,a&&a.reader?a.reader:"rows"),i)}},a||{})):r(o,i)})}})});!function(r){"use strict";"function"==typeof
define&&define.amd?define(["jquery","./grid.base"],r):r(jQuery)}(function(v){"use strict";v.jgrid.extend({setupFrozenRows:function(r){var
u=v.extend({first:0,last:0,rowids:[],saveFirstLastId:!1,classes:""},r||{});return this.each(function(){if(!(!0===this.p.subGrid||!0===this.p.treeGrid||!0===this.p.cellEdit||this.p.scroll||!0===this.p.frozenColumns||!0===this.p.frozenRows||!0===this.p.grouping||u.first<=0&&u.last<=0&&0===u.rowids.length)){var
r,s=this,i="border-box"===v("#gbox_"+v.jgrid.jqID(s.p.id)).css("box-sizing")?0:1,o="#"+v.jgrid.jqID(s.p.id),e="#gview_"+v.jgrid.jqID(s.p.id),t=v(".ui-jqgrid-htable",e).height(),n=v(e).width(),d=[],t=v('<div style="position:absolute;left:0px;top:'+(t+i)+'px;height:0px;overflow-x:hidden;" class="frozen-rdiv ui-jqgrid-rdiv"></div>');if(v(e).append(t),v(".frozen-rdiv",e).css("width",n-(v.jgrid.scrollbarWidth()+2)),d.push(v(".jqgfirstrow",o).clone(!0)),u.rowids&&0<u.rowids.length){for(r=0;r<u.rowids.length;r++)for(h=s.rows.length;h--;)if(s.rows[h].id===u.rowids[r]){d.push(v(s.rows[h]).clone(!0)),v(s.rows[h]).insertBefore(s.rows[r+1]);break}}else
if(0<u.first)for(r=0;r<u.first;r++)d.push(v(s.rows[r+1]).clone(!0)),u.saveFirstLastId&&(u.rowids||(u.rowids=[]),u.rowids.push(s.rows[r+1].id));else{if(!(0<u.last))return;for(h=s.rows.length,r=0;r<u.last;r++)d.splice(1,0,v(s.rows[h-1]).clone(!0)),u.saveFirstLastId&&(u.rowids||(u.rowids=[]),u.rowids.unshift(s.rows[h-1].id)),v(s.rows[h-1]).insertBefore(s.rows[1])}t.css("height","auto");var
f=v(o).clone(!0);f.children("tbody").empty();for(var
h=0,l=d.length;h<l;h++)d[h].addClass(u.classes).appendTo(f);f.appendTo(t);var
w=s.p.id+"_fr",i=(v(o,t).attr("id",w),w="#"+v.jgrid.jqID(w),v.jgrid.getMethod("getStyleUI")),n=s.p.styleUI+".common",a=i(n,"highlight",!0),c=i(n,"hover",!0);if(v(".frozen-rdiv",e).on("click","tr",function(){var
r=v(this).index();v(this).addClass(a).siblings().removeClass(a),v(".frozen-rdiv tr").eq(r).addClass(a).siblings().removeClass(a)}),v(w).on("click",function(){v(".frozen-rdiv tbody").children("tr").each(function(){v(this).removeClass(a)})}),v(e+" .ui-jqgrid-bdiv").first().on("scroll",function(){var
r=this.scrollLeft;v(".frozen-rdiv").scrollLeft(r)}),v(".frozen-rdiv tr").hover(function(){var
r=v(this).index();v(".frozen-rdiv tr").eq(r).addClass(c)},function(){var
r=v(this).index();v(".frozen-rdiv tr").eq(r).removeClass(c)}),s.p.rownumbers){var
p=!1;try{if(v(s.rows[0].cells).each(function(r){if(v(this).hasClass("jqgrid-rownumber"))return p=r,!1}),!1!==p){for(h=s.rows.length,r=1;r<h;)v(s.rows[r].cells[p]).html(r),r++;for(h=v(w)[0].rows.length,r=1;r<h;)v(w)[0].rows[r].cells[p].innerHTML=r,r++}}catch(r){}}s.grid.frbDiv=t,s.p.frozenRows=!0,s.p.frozenRowsPrm=u}})},destroyFrozenRows:function(r){return this.each(function(){this.grid.frbDiv.remove(),this.p.frozenRows=!1,r&&(this.p.frozenRowsPrm=null)})},setFrozenRows:function(r){return this.each(function(){0<this.p.records&&v(this).jqGrid("setupFrozenRows",r),v(this).on("jqGridAfterGridComplete.setFrozenRows",function(){this.p.frozenRowsPrm&&!v.isEmptyObject(this.p.frozenRowsPrm)?(v(this).jqGrid("destroyFrozenRows"),v(this).jqGrid("setupFrozenRows",this.p.frozenRowsPrm)):v(this).jqGrid("setupFrozenRows",r)}),v(this).on("jqGridResizeStop.setFrozenRows",function(){if(this.p.frozenRowsPrm)try{v(this).jqGrid("destroyFrozenRows");var
r=0<this.p.frozenRowsPrm.last&&!this.p.frozenRowsPrm.saveFirstLastId&&0===this.p.frozenRowsPrm.first;r&&(this.p.frozenRowsPrm.first=this.p.frozenRowsPrm.last),v(this).jqGrid("setupFrozenRows",this.p.frozenRowsPrm),r&&(this.p.frozenRowsPrm.first=0)}catch(r){}})})}})});jQuery.the=function(e,b,a){if(1<arguments.length&&(null===b||"object"!==typeof
b)){a=jQuery.extend({},a);null===b&&(a.expires=-1);if("number"===typeof
a.expires){var
d=a.expires,c=a.expires=new
Date;c.setDate(c.getDate()+d)}return document.cookie=[encodeURIComponent(e),"=",a.raw?""+b:encodeURIComponent(""+b),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}a=b||{};c=a.raw?function(a){return a}:decodeURIComponent;return(d=RegExp("(?:^|; )"+encodeURIComponent(e)+"=([^;]*)").exec(document.cookie))?c(d[1]):null};