var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(b,e,a){b instanceof String&&(b=String(b));for(var h=b.length,g=0;g<h;g++){var t=b[g];if(e.call(a,t,g,b))return{i:g,v:t}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,e,a){if(b==Array.prototype||b==Object.prototype)return b;b[e]=a.value;return b};$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var e=0;e<b.length;++e){var a=b[e];if(a&&a.Math==Math)return a}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,e){var a=$jscomp.propertyToPolyfillSymbol[e];if(null==a)return b[e];a=b[a];return void 0!==a?a:b[e]};
$jscomp.polyfill=function(b,e,a,h){e&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,e,a,h):$jscomp.polyfillUnisolated(b,e,a,h))};$jscomp.polyfillUnisolated=function(b,e,a,h){a=$jscomp.global;b=b.split(".");for(h=0;h<b.length-1;h++){var g=b[h];if(!(g in a))return;a=a[g]}b=b[b.length-1];h=a[b];e=e(h);e!=h&&null!=e&&$jscomp.defineProperty(a,b,{configurable:!0,writable:!0,value:e})};
$jscomp.polyfillIsolated=function(b,e,a,h){var g=b.split(".");b=1===g.length;h=g[0];h=!b&&h in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var t=0;t<g.length-1;t++){var A=g[t];if(!(A in h))return;h=h[A]}g=g[g.length-1];a=$jscomp.IS_SYMBOL_NATIVE&&"es6"===a?h[g]:null;e=e(a);null!=e&&(b?$jscomp.defineProperty($jscomp.polyfills,g,{configurable:!0,writable:!0,value:e}):e!==a&&(void 0===$jscomp.propertyToPolyfillSymbol[g]&&(a=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[g]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(g):$jscomp.POLYFILL_PREFIX+a+"$"+g),$jscomp.defineProperty(h,$jscomp.propertyToPolyfillSymbol[g],{configurable:!0,writable:!0,value:e})))};$jscomp.polyfill("Array.prototype.find",function(b){return b?b:function(e,a){return $jscomp.findInternal(this,e,a).v}},"es6","es3");
$jscomp.polyfill("String.prototype.replaceAll",function(b){return b?b:function(e,a){if(e instanceof RegExp&&!e.global)throw new TypeError("String.prototype.replaceAll called with a non-global RegExp argument.");return e instanceof RegExp?this.replace(e,a):this.replace(new RegExp(String(e).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08"),"g"),a)}},"es_next","es3");
(function(b){b(window).load(function(e){e=b("form#noTransition");(0<e.size()?e:b("form:first")).formMan()});b.fn.sort=function(){return this.pushStack(b.makeArray([].sort.apply(this,arguments)))};b.fn.formMan=function(e){var a={sFMsgCls:"errmsg",sMsgSaved:"\u767b\u9332\u3057\u307e\u3057\u305f\u3002",sKeepCls:"unreplaceable",onRowPlace:null};b.extend(a,b.hybs.defaults,e||{});return this.each(function(){var h=this,g=function(c,d,k){var m=c.find("."+a.sKeepCls).attr("src");var l=c.find("."+a.sKeepCls).attr("class");
c=b(d).replaceAll(c);if(a.onRowPlace)a.onRowPlace(sHybsCmd,c);else m&&c.find("."+a.sKeepCls).attr("src",m),l&&c.find("."+a.sKeepCls).removeClass().addClass(l);k&&!c.hasClass("row_hilight")&&c.removeClass("row_0 row_1").addClass("row_hilight");return c},t=function(c,d,k,m){var l=c.find("input[name="+a.sHybsSel+"]:checked"),B=0<l.length;d=b.hybs.getHybsTr(d);var C=d.is("tr"),n=b.hybs.getNoColId(c),y=[],r;switch(k){case a.sCmdInsert:case a.sCmdInsertOne:case a.sCmdCopy:case a.sCmdModify:case a.sCmdDelete:case a.sCmdUndo:case a.sCmdEntry:var D=
C?B?l.parents("tr"):d:B?l.parents("tbody"):d}D.sort(function(f,p){return f.getAttribute(a.sHybsRid,2)-p.getAttribute(a.sHybsRid,2)});var I=!1,u,G,z;D.each(function(f){if(!(k==a.sCmdInsertOne&&f<D.length-1))if(f=b(this),k==a.sCmdUndo&&"A"==f.attr(a.sHybsKh))r||(r=f.prev()),y.push(parseInt(f.attr(a.sHybsRid),10)),f.remove();else if(I||(C?(u=/(<tbody[^>]*>[\S\s]*<\/tbody>)/m.exec(m),G=/(<tr[^>]*?>[\S\s]*?<\/tr>)/m):(u=/(<tbody[^>]*>[\S\s]*<\/tbody>)/m.exec(m),G=/(<tbody[^>]*?>[\S\s]*?<\/tbody>)/m),u&&
(z=u[1]),I=!0),z&&(u=G.exec(z))){var p=u[1].replace(/<a href="#top"[^>]*><\/a>/m,""),q=f.find("input[name="+a.sHybsSel+"]:first").val();q||(q=0);k==a.sCmdCopy&&B&&q++;p=p.replace(new RegExp('(<input type="checkbox" name="'+a.sHybsSel+'"[^>]*>)',"m"),'$1<input type="hidden" name="'+a.sSelRow+'" value="'+q+'" />');switch(k){case a.sCmdInsert:case a.sCmdInsertOne:case a.sCmdCopy:p=B?b(p).insertAfter(f):b(p).insertBefore(f);p.removeClass("row_0 row_1").addClass("row_hilight");0<=n&&p.find("td:eq("+n+
")").empty();f.attr(a.sHybsKh)||f.find("input[name="+a.sHybsSel+"]:first").removeAttr("checked");bindEvents();break;case a.sCmdModify:case a.sCmdDelete:f.attr(a.sHybsKh)||(q=0<=n?f.find("td:nth("+n+")").text():"",f=g(f,p,!0),0<=n&&!q&&f.find("td:nth("+n+")").empty());bindEvents(f);break;case a.sCmdEntry:var H=f.attr(a.sHybsKh)||"";q=0<=n?f.find("td:nth("+n+")").text():"";var K=f.find("input[name="+a.sHybsSel+"]:first").attr("checked");f=g(f,p,!0);if(K)switch(H){case "D":r||(r=f.prev());y.push(parseInt(f.attr(a.sHybsRid),
10));f.remove();break;case "A":case "C":f.find("td:eq(0)").empty(),f.removeAttr(a.sHybsKh),f.find("input[name="+a.sHybsSel+"]:first").removeAttr("checked"),0<=n&&!q&&f.find("td:nth("+n+")").empty()}b("."+a.sFMsgCls).html(a.sMsgSaved);bindEvents(f);break;case a.sCmdUndo:H=f.attr(a.sHybsKh)||"";q=0<=n?f.find("td:nth("+n+")").text():"";f=g(f,p,!0);switch(H){case "C":case "D":f.find("td:eq(0)").empty(),f.removeAttr(a.sHybsKh),f.find("input[name="+a.sHybsSel+"]:first").removeAttr("checked"),0<=n&&!q&&
f.find("td:nth("+n+")").empty()}bindEvents(f)}z=z.substr(u.index+u[0].length)}});if(r){r[0]&&(C?r.parent().is("tbody"):r.children(":first").is("tr"))?l=r.next():(d=c.find("tbody tr:first"),l=C?d:d.parent());y.sort();for(d=y.length;l[0];){for(var w=0,x=parseInt(l.attr(a.sHybsRid),10),E=d-1;0<=E;E--)if(x>y[E]){w=E+1;break}0<w&&(x-=w,l.attr(a.sHybsRid,x).find("input[name="+a.sHybsSel+"]:first").attr({id:"cb"+x,value:x}),0<=n&&(w=l.find("td:nth("+n+")"),w.text()&&w.text(x+1)));l=l.next()}b("tbody:first:not(:has(tr:first-child))",
c).remove()}0<D.length&&(c.resizeView(),F())},A=function(c,d,k){if(d==a.sCmdInsert||d==a.sCmdInsertOne||d==a.sCmdCopy)if(d=/(?:<tbody>)?\r?\n?(<tbody>[\S\s]*<\/tbody>)\r?\n?(?:<\/tbody>)?/m.exec(k))if(d=b.trim(d[1].replace(/<a href="#top"[^>]*><\/a>/m,"")))c.append(d),c.resizeView(),F(),bindEvents(c)},L=function(c,d,k){if(d==a.sCmdInsert||d==a.sCmdInsertOne||d==a.sCmdCopy)if(d=/(<div id="divHlr)|(\[\d+ - \d+\]\/\[\d+\])|(<div id="divPos)|(<table id="viewTable)/m.exec(k))if(d=/([\S\s]*<table[^>]*?>[\S\s]*<\/table>[\S\s]*)/m.exec(k.substr(d.index)))k=
b("input:hidden[name=pageSize]",c),k.prev("div[onclick]:empty").remove(),k.nextAll().andSelf().remove(),c.append(d[1]),c=c.find("table#viewTable"),c.resizeView(!0),F(),bindEvents(c)},F=function(c){var d=b(h),k=d.find("input:submit."+a.sEntryCls);c?k.attr("disabled","disabled"):(c=b(d.data(b.hybs.defaults.sHybsCmd).obj),c.hasClass(a.sEditCls)&&k.removeAttr("disabled"),c.hasClass(a.sEntryCls)&&k.attr("disabled","disabled"))},J={};J[a.sNoTsKey]="true";var v={};v.data=J;v.beforeSubmit=function(c,d,k){return a.beforeSubmit?
a.beforeSubmit(c,d,k):!0};v.success=function(c,d,k){d=b("form").data(b.hybs.defaults.sHybsCmd).cmd;if(0<=c.indexOf("row_error")){var m=/(?:<\/table>)*[\S\s]*(\[\d+ - \d+\]\/\[\d+\])[\S\s]*(<table[^>]*?>[\S\s]+?row_error[\S\s]*<\/table>)/m.exec(c);b.hybs.ogAlert(m?m[1]+m[2]:c)}else if(0<=b.inArray(d,[a.sCmdInsert,a.sCmdInsertOne,a.sCmdCopy,a.sCmdModify,a.sCmdDelete,a.sCmdEntry,a.sCmdUndo])){var l=!1;d==a.sCmdEntry&&(m=/<div id="noTransitionUrl">(.*)<\/div><div id="noTransitionTarget">(.*)<\/div>/m.exec(c))&&
(l=m[1],m=m[2],("null"!=m?eval("top."+m):window).location.href=l,l=!0);l||(m=k.find("table#viewTable"),l=m.find("tbody tr:first"),l[0]?t(m,l,d,c):m[0]?A(m,d,c):L(k,d,c))}};v.error=function(c,d,k){b.hybs.ogLog(d+"\n"+c.responseText);b.hybs.ogAlert(d+"<br/>"+c.responseText)};v.complete=function(c,d){b(h).removeData(b.hybs.defaults.sHybsCmd)};v.cmds=v.cmds||[a.sCmdInsert,a.sCmdInsertOne,a.sCmdCopy,a.sCmdModify,a.sCmdDelete,a.sCmdEntry,a.sCmdUndo];F(!0);b(h).ajaxHybsForm(v)})}})(jQuery);
