realgrid
Version:
RealGrid is a javascript data grid component with various powerful functions such as editing, row grouping, filtering, and sorting data on web environment.
7 lines (6 loc) • 1.97 MB
JavaScript
/**
* RealGrid v2.9.2.1912
* Copyright (C) 2013-2025 WooriTech Inc.
* All Rights Reserved.
*/
var t={name:"RealGrid2",version:"2.9.2.1912",license:"enterprise",code:null},e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},e(t,i)};function i(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}var o=function(){return o=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};function r(t,e,i,o){return new(i||(i=Promise))((function(r,n){function s(t){try{l(o.next(t))}catch(t){n(t)}}function a(t){try{l(o.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((o=o.apply(t,e||[])).next())}))}function n(t,e){var i,o,r,n,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function a(a){return function(l){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;n&&(n=0,a[0]&&(s=0)),s;)try{if(i=1,o&&(r=2&a[0]?o.return:a[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;switch(o=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){s.label=a[1];break}if(6===a[0]&&s.label<r[1]){s.label=r[1],r=a;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(a);break}r[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],o=0}finally{i=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function s(t,e,i){if(i||2===arguments.length)for(var o,r=0,n=e.length;r<n;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var a,l,h,u,c,d,p,f="$_hash",_="$_view",g="$_row",y="$_idx",m="$_foc",b="$_lev";!function(t){t.TEXT="text",t.NUMBER="number",t.BOOLEAN="boolean",t.DATETIME="datetime",t.OBJECT="object",t.CHAR="char",t.UNUM="unum",t.INT="int",t.UINT="uint",t.DATE="date"}(a||(a={})),function(t){t.ASCENDING="ascending",t.DESCENDING="descending",t.NONE="none"}(l||(l={})),function(t){t.SENSITIVE="sensitive",t.INSENSITIVE="insensitive"}(h||(h={})),function(t){t.ROWS="rows",t.ITEMS="items"}(u||(u={})),function(t){t.AUTO="auto",t.EXPLICIT="explicit"}(c||(c={})),function(t){t.AUTO="auto",t.EXPLICIT="explicit"}(d||(d={})),function(t){t.NONE="none",t.HEADER="header",t.FOOTER="footer",t.SUMMARY="summary",t.BOTH="both"}(p||(p={}));var v,w,C=function(t){return t==p.BOTH||t==p.HEADER};!function(t){t.ALWAYS="always",t.UPDATE="update",t.INSERT="insert"}(v||(v={})),function(t){t.ERROR="error",t.WARNING="warning",t.INFO="info",t.IGNORE="ignore"}(w||(w={}));var x,I,E,S,O,R,P,k,D,T,M,F,L,N,$,A,B,V,j,H,W,G,U,Y,z,q,K,X,Z,J,Q={error:1,warning:2,info:3,ignore:4},tt=function(t,e){return Q[t]-Q[e]};!function(t){t.NONE="none",t.AGGREGATE="aggregate",t.STATISTICAL="statistical"}(x||(x={})),function(t){t.NONE="none",t.LEFT_EDGE="leftEdge",t.RIGHT_EDGE="rightEdge",t.TOP_EDGE="topEdge",t.BOTTOM_EDGE="bottomEdge",t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom",t.CENTER="center"}(I||(I={})),function(t){t.NONE="none",t.HEAD="head",t.BODY="body",t.TAIL="tail"}(E||(E={})),function(t){t.NONE="none",t.EVEN="even",t.EVEN_FILL="evenFill",t.FILL="fill"}(S||(S={})),function(t){t.DATA="data",t.HEADER="header",t.FOOTER="footer",t.SUMMARY="summary",t.INDICATOR="indicator",t.STATE="state",t.CHECK="check",t.HEAD="head",t.FOOT="foot",t.SUM="sum",t.FIXED_BAR="fixedbar",t.GROUP_HEADER="groupHeader",t.GROUP_FOOTER="groupFooter",t.GROUP_BAR="groupBar",t.GROUP_HEAD="groupHead",t.GROUP_FOOT="groupFoot",t.GROUP_PANEL="groupPanel",t.GROUP_COLUMN="groupColumn",t.GRID_EMPTY="gridEmpty",t.LAYOUT_HEADER="layoutHeader",t.FILTER="filter",t.INLINE_FILTER="inlineFilter",t.SCROLL_BAR="scrollBar",t.SCROLL_TRACK="scrollTrack",t.SCROLL_THUMB="scrollThumb",t.SCROLL_BUTTON="scrollButton",t.SCROLL_EDGE="scrollEdge"}(O||(O={})),function(t){t.NONE="none",t.ROW="row",t.DATA="data",t.FILL="fill",t.CELL="cell"}(R||(R={})),function(t){t.NORMAL="normal",t.UPPER="upper",t.LOWER="lower",t.DEFAULT="default"}(P||(P={})),function(t){t.NORMAL="normal",t.TODAY="today",t.TODAY_WHEN_NULL="todayWhenNull",t.DEFAULT="default",t.DEFAULT_WHEN_NULL="defaultWhenNull"}(k||(k={})),function(t){t.NONE="none",t.EXCLUSIVE="exclusive",t.INCLUSIVE="inclusive",t.REVERSE="reverse"}(D||(D={})),function(t){t.NORMAL="normal",t.CHECK="check",t.RADIO="radio",t.SEPARATOR="separator"}(T||(T={})),function(t){t.VISIBLE="visible",t.HOVERED="hovered",t.ALWAYS="always",t.HIDDEN="hidden",t.ACTIVE_OR_HOVERED="activeOrHovered"}(M||(M={})),function(t){t.NONE="none",t.ACTION="action",t.POPUP="popup"}(F||(F={})),function(t){t.ALWAYS="always",t.DEFAULT="default",t.VISIBLE="visible",t.HIDDEN="hidden",t.ROWFOCUSED="rowfocused"}(L||(L={})),function(t){t.LEFT="left",t.RIGHT="right",t.LEFT_EDGE="leftEdge",t.RIGHT_EDGE="rightEdge",t.TOP="top",t.BOTTOM="bottom",t.TOP_EDGE="topEdge",t.BOTTOM_EDGE="bottomEdge",t.CENTER="center"}(N||(N={})),function(t){t.ALL="all",t.VISIBLE_ONLY="visibleOnly",t.RECYCLE="recycle"}($||($={})),function(t){t.CANCEL="cancel",t.COMMIT="commit",t.DEFAULT="default"}(A||(A={})),function(t){t.ROW="row",t.GROUP="group",t.FOOTER="footer",t.TREE="tree"}(B||(B={})),function(t){t.COUNT="count",t.SUM="sum",t.MAX="max",t.MIN="min",t.AVG="avg",t.VAR="var",t.VARP="varp",t.STDEV="stdev",t.STDEVP="stdevp",t.DATACOUNT="datacount",t.DATAAVG="dataavg"}(V||(V={})),function(t){t.ALWAYS="always",t.DEFAULT="default",t.NONE="none"}(j||(j={})),function(t){t.ROW="row",t.GRID="grid",t.NONE="none"}(H||(H={})),function(t){t.LAYER="layer",t.LINE="line"}(W||(W={})),function(t){t.LEFT_TOP="leftTop",t.LEFT_BOTTOM="leftBottom",t.RIGHT_TOP="rightTop",t.RIGHT_BOTTOM="rightBottom"}(G||(G={})),function(t){t.EXPAND="expand",t.COLLAPSE="collapse",t.ALWAYS="always"}(U||(U={})),function(t){t.NONE="none",t.OVER="over",t.ALWAYS="always"}(Y||(Y={})),function(t){t.EQUAL="equal",t.NOT_EQUAL="notEqual",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.STARTS_WITH="startsWith",t.ENDS_WITH="endsWith",t.RESET="reset",t.GREATER="greater",t.GREATER_EQUAL="greaterEqual",t.LOWER="lower",t.LOWER_EQUAL="lowerEqual",t.BETWEEN="between",t.EMPTY="empty"}(z||(z={})),function(t){t.TRIANGLE="triangle",t.SQUARE="square"}(q||(q={})),function(t){t.FIRST="first",t.LAST="last",t.DEFAULT="default"}(K||(K={})),function(t){t.EXPAND="expand",t.COLLAPSE="collapse",t.REMAIN_AND_EXPAND="remainAndExpand",t.REMAIN_AND_COLLAPSE="remainAndCollapse"}(X||(X={})),function(t){t.NONE="none",t.HOUR="hour",t.MINUTE="minute",t.SECOND="second",t.AUTO="auto"}(Z||(Z={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(J||(J={}));var et,it=function(){function t(t,e,i,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===o&&(o=0),this.x=t,this.y=e,this.width=i,this.height=o}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x},set:function(t){var e=t-this.x;this.x+=e,this.width-=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},set:function(t){var e=t-(this.x+this.width);this.width+=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},set:function(t){var e=t-this.y;this.y+=e,this.height-=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},set:function(t){var e=t-(this.y+this.height);this.height+=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this.width||0===this.height},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.getInner=function(){return new t(0,0,this.width,this.height)},t.prototype.equals=function(t){return t===this||t&&this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height},t.prototype.leftBy=function(t){return this.x+=t,this.width-=t,this},t.prototype.rightBy=function(t){return this.width+=t,this},t.prototype.topBy=function(t){return this.y+=t,this.height-=t,this},t.prototype.bottomBy=function(t){return this.height+=t,this},t.prototype.shrink=function(t,e){return this.width-=t,this.height-=e,this},t.prototype.expand=function(t,e){return this.width+=t,this.height+=e,this},t.prototype.contains=function(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},t.prototype.setEmpty=function(){return this.width=this.height=0,this},t.prototype.move=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e,this},t.prototype.set=function(t,e,i,o){return this.x=t,this.y=e,this.width=i,this.height=o,this},t.prototype.setWidth=function(t){return this.width=t,this},t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.copyHorz=function(t){return this.x=t.x,this.width=t.width,this},t.prototype.copyVert=function(t){return this.y=t.y,this.height=t.height,this},t.prototype.inflate=function(t,e,i,o){return void 0===t&&(t=0),void 0===e&&(e=void 0),void 0===i&&(i=void 0),void 0===o&&(o=void 0),e=void 0!==e?e:t,i=void 0!==i?i:t,o=void 0!==o?o:e,t&&(this.left=this.x-t),e&&(this.top=this.y-e),i&&(this.right=this.right+i),o&&(this.bottom=this.bottom+o),this},t.prototype.offset=function(t,e){return this.x+=t,this.y+=e,this},t.prototype.round=function(){var t=this.clone();return t.x>>>=0,t.y>>>=0,t.width>>>=0,t.height>>>=0,t},t.prototype.union=function(t){var e=this.clone();return e.left=Math.min(this.x,t.x),e.right=Math.max(this.right,t.right),e.top=Math.min(this.y,t.y),e.bottom=Math.max(this.bottom,t.bottom),e},t.prototype.normalize=function(){return this.width<0&&(this.x-=this.width,this.width*=-1),this.height<0&&(this.y-=this.height,this.height*=-1),this},t.prototype.toString=function(){return"{x: "+this.x+", y: "+this.y+", width: "+this.width+", height: "+this.height+"}"},t.Temp=new t,t}(),ot="undefined"!=typeof window?window:{},rt={ua:(et="undefined"!=typeof window&&window.navigator||{}).userAgent||"",platform:(et.platform||"").toUpperCase()},nt=rt.ua,st=rt.platform,at=st.indexOf("MAC")>=0,lt=st.indexOf("WIN")>=0,ht=!!ot.chrome,ut=void 0!==ot.InstallTrigger,ct=!!ot.safari||!ht&&nt.indexOf("Safari")>=0,dt=/iPad|iPhone|iPod/.test(nt)&&!ot.MSStream,pt=!!nt.match(/Trident.*rv\:11\./),ft=-1!==nt.indexOf("MSIE 10"),_t=-1!==nt.indexOf("MSIE 9"),gt=pt||ft||_t,yt=Date.now(),mt=void 0,bt=void 0,vt=void 0,wt=void 0,Ct=void 0;function xt(t){return t&&t.ownerDocument&&(t.ownerDocument.defaultView||t.ownerDocument.parentWindow)}function It(t){return t&&t.ownerDocument}function Et(t){return t.defaultView||t.parentWindow}var St,Ot=function(){function t(){}return t.stopEvent=function(t,e){void 0===e&&(e=!1),t.preventDefault?(t.preventDefault(),t.stopPropagation()):t.returnValue=!1,e&&t.stopImmediatePropagation()},t.setDebugging=function(e,i,o){t.$$_debugging=i,t.$$_keyLog=o},t.isDebugging=function(){return t.$$_debugging},t.setSlotMode=function(e){t.$$_slotMode=e},t.setLanguage=function(e){t.$$_lang=e},Object.defineProperty(t,"language",{get:function(){return this.$$_lang},enumerable:!1,configurable:!0}),t.isSlotMode=function(){return t.$$_slotMode},t.log=function(e){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];t.isDebugging()&&console.log(e,i)},t.keyLog=function(e){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];t.$$_keyLog&&console.log(e,i)},t.isArray=function(t){return Array.isArray(t)},t.isObject=function(t){return null!=t&&"object"==typeof t},t.makeArray=function(e,i){return void 0===i&&(i=!1),null!=e?t.isArray(e)?e:[e]:i?[]:void 0},t.isNumber=function(t){return"number"==typeof t},t.getNumber=function(t,e){return isNaN(parseFloat(t))?e:parseFloat(t)},t.getTimer=function(){return(new Date).getTime()-yt},t.isWhiteSpace=function(t){return!t||!t.trim()},t.pad=function(t,e,i){return e=Math.max(e||2,1),i=i||"0",new Array(e-String(t).length+1).join(i)+t},t.pick=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i,o=t.length,r=0;r<o;r++)if(null!=(i=t[r]))return i},t.included=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];for(var o=e.length,r=0;r<o;r++)if(e[r]==t)return!0;return!1},t.valueIn=function(t,e){if("object"==typeof e)for(var i=Object.keys(e),o=0;o<i.length;o++)if(e[i[o]]===t)return!0;return!1},t.compareTextValue=function(t,e,i,o){if(t===e)return!0;var r=String(t),n=null==e?void 0:String(e);return!r&&!n||!(!r||!n)&&(i||(r=r.toLowerCase(),n=n.toLowerCase()),o?n.indexOf(r)>=0:r==n)},t.cast=function(t,e){return t instanceof e?t:null},t.toInt=function(t,e){var i=parseInt(t,e||10);return isNaN(i)?0:i},t.toFloat=function(t){var e=parseFloat(t);return isNaN(e)?0:e},t.hex=function(t,e,i){void 0===e&&(e=2),void 0===i&&(i="0"),e=Math.max(e||2,1);var o=t.toString(16);return i=i||"0",new Array(e-o.length+1).join(i)+o},t.deepCopy=function(e){if(null==e||"object"!=typeof e)return e;if(e instanceof Date)return new Date(e);for(var i=t.isArray(e)?[]:{},o=0,r=Object.keys(e);o<r.length;o++){var n=r[o];e.hasOwnProperty(n)&&(i[n]=t.deepCopy(e[n]))}return i},t.extendObj=function(t,e){if(null==t||"object"!=typeof t||null==e||"object"!=typeof e)return e;for(var i=0,o=Object.keys(t);i<o.length;i++){var r=o[i];t.hasOwnProperty(r)&&void 0===e[r]&&(e[r]=t[r])}return e},t.getBounds=function(t){var e=new it;return e.x=t.offsetLeft,e.y=t.offsetTop,e.width=t.offsetWidth,e.height=t.offsetHeight,e},t.toStr=function(t){return"number"==typeof t?isNaN(t)?"":String(t):null!=t?String(t):""},t.setBounds=function(t,e,i,o,r){var n=t.style;n.left=e+"px",n.top=i+"px",n.width=o+"px",n.height=r+"px"},t.getClientRect=function(e){var i=e.getBoundingClientRect(),o=t.getZoom(e),r=new it(i.left/o,i.top/o,i.width/o,i.height/o);if("BODY"===e.tagName){var n=e.ownerDocument.defaultView;r.height=Math.max(r.height,e.scrollHeight,n.innerHeight),r.width=Math.max(r.width,e.scrollHeight,n.innerWidth)}return r.cx=e.offsetLeft,r.cy=e.offsetTop,r},t.getZoom=function(t){var e=t.offsetWidth||t.scrollWidth,i=t.offsetHeight||t.scrollHeight,o=t.getBoundingClientRect(),r=NaN;try{if(o.height&&o.width?r=(o.height/i+o.width/e)/2:o.height?r=o.height/i:o.width&&(r=o.width/e),isNaN(r)){var n=getComputedStyle(t).zoom;n&&(r=parseFloat(n))}if(isNaN(r))throw new Error("zomm check fail")}catch(t){r=1}return Math.round(100*r)/100},t.getMargin=function(t){var e=0,i=0;if(t instanceof xt(t).HTMLBodyElement)for(var o=t;o;){var r=getComputedStyle(o);"static"===r.position&&(e+=parseFloat(r.marginLeft)||0,i+=parseFloat(r.marginTop)||0),o=o.parentElement}return{x:e,y:i}},t.getChildIndex=function(t){if(t){var e=t.parentNode;if(e)for(var i=e.children,o=i.length;o--;)if(i[o]===t)return o}return-1},t.clearChildren=function(t){for(var e;e=t.lastChild;)t.removeChild(e)},t.clearElements=function(e){for(var i;i=e.lastChild;)t.clearElements(i),e.removeChild(i)},t.addChild=function(t,e){return!(!t||!e||e.parentNode===t)&&(t.appendChild(e),!0)},t.removeChild=function(t,e){return!(!t||!e||e.parentNode!==t)&&(t.removeChild(e),!0)},t.disableSelection=function(t){var e=t.style;e["-moz-user-select"]="-moz-none",e["-khtml-user-select"]="none",e["-webkit-user-select"]="none",e["-o-user-select"]="none",e["-ms-user-select"]="none",e["user-select"]="none"},t.setMobile=function(t){mt=t},t.setIECompatMode=function(t){Ct=t},t.setTablet=function(t){vt=t},t.isMobile=function(){return void 0!==mt?mt:(void 0===bt&&(bt=this.$_checkMobile()),bt)},t.isIEMode=function(){return!t.isMobile()&&!t.isChromium&&Ct&&!1===navigator.msPointerEnabled},t.isTablet=function(){return void 0!==vt?vt:(void 0===wt&&(wt=this.$_checkTablet()),wt)},t.$_checkTablet=function(){return t.isMobile()&&/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(nt.toLowerCase())},t.$_checkMobile=function(){var t=!1;return(nt.match(/Android/i)||nt.match(/webOS/i)||nt.match(/iPhone/i)||nt.match(/iPad/i)||nt.match(/iPod/i)||nt.match(/BlackBerry/i)||nt.match(/Windows Phone/i))&&(t=!0),t||(t="ontouchstart"in window&&nt.indexOf("Macintosh")>=0),t},t.getBrowserSize=function(e){var i=e?e.ownerDocument:document,o=i.defaultView,r=i.body,n=i.documentElement,s=t.getZoom(r);return{width:o.innerWidth/s||n.clientWidth||r.clientWidth,height:o.innerHeight/s||n.clientHeight||r.clientHeight}},t.move=function(t,e,i){t.style.left=e+"px",t.style.top=i+"px"},t.htmlEncode=function(t){return document.createElement("a").appendChild(document.createTextNode(t)).parentNode.innerHTML},t.detach=function(t){return t&&t.parentNode&&t.parentNode.removeChild(t),null},t.getSize=function(e){return t.getClientRect(e)},t.getScrolled=function(t){var e=t.body,i=Et(t),o=t.documentElement;return{sx:i.pageXOffset||o.scrollLeft||e.scrollLeft,sy:i.pageYOffset||o.scrollTop||e.scrollTop}},t.getOffset=function(e){var i=t.getZoom(e),o=e.ownerDocument,r=o.defaultView,n=t.getClientRect(e),s=o.body,a=o.documentElement,l=r.pageYOffset||a.scrollTop||s.scrollTop,h=r.pageXOffset||a.scrollLeft||s.scrollLeft;l/=i,h/=i;var u=a.clientTop||s.clientTop||0,c=a.clientLeft||s.clientLeft||0,d=n.left+h-c,p=n.top+l-u;return{x:Math.round(d),y:Math.round(p)}},t.isAncestorOf=function(t,e,i){var o;if(e instanceof HTMLElement)o=e;else for(var r=this.getComposedPath(i);r.length;){var n=r.shift();if(n instanceof HTMLElement){o=n;break}}for(;o;){if(o==t)return!0;o=o.parentElement}return!1},t.getComposedPath=function(t){if(t.composedPath)return t.composedPath();for(var e=t.target,i=[];e;)i.push(e),e=e.parentElement||e.parentNode;return i},t.equalNumbers=function(t,e){return isNaN(t)&&isNaN(e)||!isNaN(t)&&t==e},t.equalArrays=function(t,e){if(t===e)return!0;if(null==t||null==e)return!1;var i=t.length;if(i!=e.length)return!1;for(var o=0;o<i;++o)if(t[o]!==e[o])return!1;return!0},t.equalObjects=function(t,e){return t==e||JSON.stringify(t)===JSON.stringify(e)},t.isLeapYear=function(t){return t%4==0&&t%100!=0||t%400==0},t.incMonth=function(e,i){var o=e.getDate();return e.setDate(1),e.setMonth(e.getMonth()+i),e.setDate(Math.min(o,t.month_days[t.isLeapYear(e.getFullYear())?1:0][e.getMonth()])),e},t.incYear=function(e,i){var o=e.getDate();return e.setDate(1),e.setFullYear(e.getFullYear()+i),e.setDate(Math.min(o,t.month_days[t.isLeapYear(e.getFullYear())?1:0][e.getMonth()])),e},t.setClassName=function(t,e){(e=e||"")!=t.className&&(t.className=e)},t.addClassName=function(t,e){if(e=e||"",t.classList)t.classList.add(e);else{var i=t.className.split(" ");i.indexOf(e)<0&&i.push(e),t.className=i.join(" ")}},t.removeClassName=function(t,e){if(t.classList)t.classList.remove(e);else{var i,o=t.className.split(" ");(i=o.indexOf(e))>=0&&o.splice(i,1),t.className=o.join(" ")}},t.setStyle=function(t,e){var i=e.style;for(var o in t)null!=t[o]?i[o]=t[o]:(i.removeProperty?i.removeProperty(o):i.removeAttribute&&i.removeAttribute(o),i[o]="")},t.getTextLength=function(t){for(var e=0,i=0,o=0;t&&(i=t.charCodeAt(o));o++)e+=i>>7?2:1;return e},t.escapeRegExp=function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},t.isEmpty=function(t){return t&&Object.keys(t).length>0},t.isPassive=function(){if(null===t.$_supportPassive){t.$_supportPassive=!1;try{addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){t.$_supportPassive=!0}}))}catch(e){t.log("passive not support")}}return t.$_supportPassive},t.hangulToChosungAll=function(e){for(var i="",o=0;o<e.length;o++){var r=e.charCodeAt(o)-44032;i+=r>-1&&r<11172?t.cho[Math.floor(r/588)]:e[o]}return i},t.hangulToChosung=function(e){var i={cho:e,org:e};if(/[ㄱ-힝]/.test(e)){var o=t.cho,r=e.charCodeAt(0);r>=12593&&r<=12622&&(i.org=void 0),(r-=44032)>=0&&r<11172&&(i.cho=o[Math.floor(r/588)])}return i},t.addQuot=function(t,e){return t&&(t.indexOf("\n")>=0||t.indexOf("\r\n")>=0||'"'==t.charAt(0))&&(t='"'+(t=t.replace(/\"/g,'""'))+'"'),t},t.addQuatation=function(t,e,i,o){return null!=t&&((i||o)&&(i&&t&&(t=t.replace(/\n/g,i)),o&&t&&(t=t.replace(/\r/g,o))),(e||t.indexOf("\n")>=0||t.indexOf(",")>=0||t.indexOf('"')>=0)&&(t='"'+t.replace(/\"/g,'""')+'"')),null===t?"":t},t.isClickableTemplate=function(t,e){return Array.prototype.some.call(t.querySelectorAll("input, textarea, a, select, button, [tabindex]"),(function(t){return e===t}))},t.isFocusableTemplate=function(t,e){return Array.prototype.some.call(t.querySelectorAll("input, textarea, select"),(function(t){var i=t.type;return t===e&&"button"!==i&&"checkbox"!==i}))},t.objectToCssText=function(t){return"string"==typeof t?t:t?Object.keys(t).map((function(e){return"".concat(e.split(/(?=[A-Z])/).join("-").toLowerCase(),":").concat(t[e])})).join(";"):null},t.getLast=function(t){return t[t.length-1]},t.camelToHyphen=function(t,e,i){return void 0===i&&(i="-"),t?e?t.split(/(?=[A-Z])/).join(i).toUpperCase():t.split(/(?=[A-Z])/).join(i).toLowerCase():t},t.find=function(t,e){for(var i=0;i<t.length;i++)if(e.call(null,t[i],i,t))return t[i]},t.isInteractive=function(t){var e=xt(t);return t instanceof(null==e?void 0:e.HTMLInputElement)&&"checkbox"===t.type||t instanceof(null==e?void 0:e.HTMLAnchorElement)},t.assign=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];for(var o=Object(t),r=0;r<e.length;r++){var n=e[r];if(null!=n)for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[s]=n[s])}return o},t.setInert=function(t,e){e?t.removeAttribute("inert"):t.setAttribute("inert","")},t.insertBefore=function(t,e,i){if(e.nextElementSibling!==i)return t.insertBefore(e,i)},t.ctrlKey=function(e){var i=t.isMac||t.isiOS;return e&&(i&&e.metaKey||!i&&e.ctrlKey)},t.specialKey=function(t){return t&&(t.ctrlKey||t.metaKey||t.altKey||t.shiftKey)},t.resetPosition=function(e,i,o,r,n,s,a,l){var h=It(o),u=xt(o),c=t.getBrowserSize(),d=t.getSize(e),p=i?t.getSize(i):{left:0,top:0},f=t.getZoom(h.body),_=c.width,g=c.height,y=t.getSize(o),m=u.pageXOffset||h.documentElement.scrollLeft,b=u.pageYOffset||h.documentElement.scrollTop;m/=f,b/=f,h.documentElement.scrollWidth>h.documentElement.clientWidth&&(g-=18),h.documentElement.scrollHeight>h.documentElement.clientHeight&&(_-=18);var v=t.getMargin(e);r+=v.x,n+=v.y,r+=p.left-d.left,n+=p.top-d.top,(t.ieTen||t.ieOld)&&(r+=h.documentElement.scrollLeft,n+=h.documentElement.scrollTop),n+y.height>g+b&&a&&(n=n-a.height-y.height)<0&&(n=g-y.height-2),t.isMobile()&&!t.isTablet()||!a||(d.bottom<a.bottom+y.height||g+b<a.bottom+y.height)&&(n=a.top-y.height-d.top-2),l?r=Math.max(0,r+s-y.width):r+y.width>_+m&&(r=_-y.width),t.isMobile()&&!t.isTablet()||o.offsetParent||(r+=h.documentElement.offsetLeft,n+=h.documentElement.offsetTop),t.move(o,Math.max(0,r),Math.max(0,n))},t.isIE=gt,t.ieAll=gt,t.ieOld=_t,t.isMac=at,t.isWin=lt,t.isSafari=ct,t.isChrome=ht,t.isFirefox=ut,t.ieTen=ft,t.ieNine=_t,t.isiOS=dt,t.isChromium=ht,t.TextProp=t.ieAll?"innerText":"textContent",t.month_days=[[31,28,31,30,31,30,31,31,30,31,30,31],[31,29,31,30,31,30,31,31,30,31,30,31]],t.cho=["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],t.colonreg=/;(?=(?:[^"]*"[^"]*")*(?![^"]*"))/,t.$_INVISIBLE_EDIT_BOUNDS=new it(-1e4,-1e4,100,100),t.$$_debugging=!1,t.$$_keyLog=!1,t.$$_slotMode=!1,t.$_supportPassive=null,t}(),Rt=function(){function t(){}return t.encode=function(e){var i,o,r,n,s,a,l,h="",u=0,c=t.CHARACTERS;for(e=t.utf8_encode(e);u<e.length;)n=(i=e.charCodeAt(u++))>>2,s=(3&i)<<4|(o=e.charCodeAt(u++))>>4,a=(15&o)<<2|(r=e.charCodeAt(u++))>>6,l=63&r,isNaN(o)?a=l=64:isNaN(r)&&(l=64),h=h+c.charAt(n)+c.charAt(s)+c.charAt(a)+c.charAt(l);return h},t.decode=function(e){var i,o,r,n,s,a,l="",h=0,u=t.CHARACTERS;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");h<e.length;)i=u.indexOf(e.charAt(h++))<<2|(n=u.indexOf(e.charAt(h++)))>>4,o=(15&n)<<4|(s=u.indexOf(e.charAt(h++)))>>2,r=(3&s)<<6|(a=u.indexOf(e.charAt(h++))),l+=String.fromCharCode(i),64!=s&&(l+=String.fromCharCode(o)),64!=a&&(l+=String.fromCharCode(r));return l=t.utf8_decode(l)},t.utf8_encode=function(t){t=t.replace(/\r\n/g,"\n");for(var e="",i=0;i<t.length;i++){var o=t.charCodeAt(i);o<128?e+=String.fromCharCode(o):o>127&&o<2048?(e+=String.fromCharCode(o>>6|192),e+=String.fromCharCode(63&o|128)):(e+=String.fromCharCode(o>>12|224),e+=String.fromCharCode(o>>6&63|128),e+=String.fromCharCode(63&o|128))}return e},t.utf8_decode=function(t){for(var e="",i=0,o=0,r=0,n=0,s=t.length;i<s;)(o=t.charCodeAt(i))<128?(e+=String.fromCharCode(o),i++):o>191&&o<224?(r=t.charCodeAt(i+1),e+=String.fromCharCode((31&o)<<6|63&r),i+=2):(r=t.charCodeAt(i+1),n=t.charCodeAt(i+2),e+=String.fromCharCode((15&o)<<12|(63&r)<<6|63&n),i+=3);return e},t.CHARACTERS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",t.btoa=function(e){for(var i,o,r,n,s=t.CHARACTERS,a="",l=0,h=(e=String(e)).length%3;l<e.length;){if((o=e.charCodeAt(l++))>255||(r=e.charCodeAt(l++))>255||(n=e.charCodeAt(l++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");i=o<<16|r<<8|n,a+=s.charAt(i>>18&63)+s.charAt(i>>12&63)+s.charAt(i>>6&63)+s.charAt(63&i)}return h?a.slice(0,h-3)+"===".substring(h):a},t}();!function(t){t.NONE="none",t.CREATED="created",t.UPDATED="updated",t.DELETED="deleted",t.CREATE_AND_DELETED="createAndDeleted"}(St||(St={}));var Pt=function(t){return t==St.DELETED||t==St.CREATE_AND_DELETED},kt=function(){function t(t){this.format=t}return Object.defineProperty(t.prototype,"format",{get:function(){return this._format},set:function(t){t!=this._format&&(this._format=t,this.parse(t))},enumerable:!1,configurable:!0}),t.prototype.toBool=function(t){return!!this.toBoolStrict(t)},t.prototype.toBoolEx=function(t){var e=this._sensitive?t:t.toLowerCase(),i=this.$_toBool(t);return null!=i?i:e?Boolean(e):void 0},t.prototype.toBoolStrict=function(t){return this.$_toBool(t)},t.prototype.toText=function(t){return t?this._trueText:this._falseText},t.prototype.$_toBool=function(t){if(this._values){var e=this._sensitive?t:t.toLowerCase();if(e in this._values)return this._values[e]}},t.prototype.parse=function(t){var e=this;if(this._values={},t){this._trueText=this._falseText=null;var i=t.split(/[;\:]/),o=this._sensitive="0"!=i[2],r=i[0]?o?i[0].split(","):i[0].toLowerCase().split(","):null,n=i[1]?o?i[1].split(","):i[1].toLowerCase().split(","):null;r&&r.forEach((function(t){e._values[t]=!1,e._falseText=e._falseText||t})),n&&n.forEach((function(t){e._values[t]=!0,e._trueText=e._trueText||t}))}else this._values[this._trueText="true"]=!0,this._values[this._falseText="false"]=!1},t.Default=new t("false,f,0:true,t,1:0"),t}(),Dt=function(){function t(t){this._format=null,this._baseYear=2e3,this._patterns=[],this._amText="AM",this._pmText="PM",this._matchPattern=!1,t&&(this.format=t)}return Object.defineProperty(t.prototype,"format",{get:function(){return this._format},set:function(t){if(t!=this._format){if(!t)throw new Error("Invalid empty date format");this._format=t,this.parseFormat(t)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseYear",{get:function(){return this._baseYear},set:function(t){t!=this._baseYear&&(this._baseYear=t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"amText",{get:function(){return this._amText},set:function(t){t!=this._amText&&(this._amText=t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pmText",{get:function(){return this._pmText},set:function(t){t!=this._pmText&&(this._pmText=t)},enumerable:!1,configurable:!0}),t.prototype.parse=function(e,i){try{for(var o=0,r=1,n=1,s=0,a=0,l=0,h=0,u=0,c=0,d=this._patterns.length,p=0,f=e.length,_=this._matchPattern,g=this.getStrPattern(e),y=0;y<d&&p<f;y++){var m=this._patterns[y],b=m.c,v=m.len;switch(b){case"y":o=parseInt(_?g[y]:e.substr(p,v));break;case"M":r=parseInt(_?g[y]:e.substr(p,v));break;case"d":n=parseInt(_?g[y]:e.substr(p,v));break;case"a":if(this._amText&&(_?g[y]===this._amText:e.indexOf(this._amText,p)==p))u=12,v=this._amText.length;else if(_?"am"===g[y].toLocaleLowerCase():"am"===e.substr(p,2).toLocaleLowerCase())u=12,v=2;else if(this._pmText&&(_?g[y]===this._pmText:e.indexOf(this._pmText,p)==p))c=12,v=this._pmText.length;else{if(_?"pm"!==g[y].toLocaleLowerCase():"pm"!==e.substr(p,2).toLocaleLowerCase()){if(i)throw"Invalid date value: "+e;return null}c=12,v=2}break;case"H":case"h":s=parseInt(_?g[y]:e.substr(p,v));break;case"m":a=parseInt(_?g[y]:e.substr(p,v));break;case"s":l=parseInt(_?g[y]:e.substr(p,v));break;case"S":h=parseInt(_?g[y]:e.substr(p,v));break;case".":case"/":case"-":case":":case" ":if(t.DATE_SEPARATORS.indexOf(_?g[y]:e.charAt(p))<0){if(i)throw"Invalid date value: ".concat(e,", invalid token[").concat(_?g[y]:e.charAt(p),"]");return null}break;default:if(i)throw"Invalid date value: ".concat(e,", invalid pattern[").concat(_?g[y]:e.charAt(p),"]");return null}p+=v}o<100&&(o+=this._baseYear),u>0?12==s&&(s=0):c>0&&s<12&&(s+=12);var w=new Date(o,r-1,n,s,a,l,h);return w.getFullYear()===o&&w.getMonth()===r-1&&w.getDate()===n?w:null}catch(t){if(i)throw t;return null}},t.prototype.parseFormat=function(t){var e=this,i=0,o=function(t){t&&!isNaN(parseInt(t))&&(e._baseYear=parseInt(t))},r=function(t){if(t){var i=t.split(",");i.length>0&&i[0]&&(e._amText=i[0]||e._amText),i.length>1&&i[1]&&(e._pmText=i[1]||e._pmText)}},n=t.split(";");if(n.length>2)o(n[1]),r(n[2]);else if(n.length>1){var s=n[1];isNaN(parseInt(s))?s&&r(s):o(s)}var a,l,h,u=n[0],c=u.length,d=0;for(this._patterns=[];d<c;)if(a=d,l=u.charAt(d),Ot.isWhiteSpace(l)){for(d++;d<c&&Ot.isWhiteSpace(u.charAt(d));)d++;this._patterns.push({c:" ",p:a,len:d-a}),i++}else{switch(h=0,l){case"y":4!=(h=this.getPattern(u,d,l))&&2!=h&&this.throwInvalidFormat(u);break;case"M":case"d":case"H":case"h":case"m":case"s":case"S":h=this.getPattern(u,d,l);break;case".":case"/":case"-":case":":i++;case"a":1!=(h=this.getPattern(u,d,l))&&this.throwInvalidFormat(u);break;default:this.throwInvalidFormat(u)}h>0&&(this._patterns.push({c:l,p:d,len:h}),d+=h)}this._matchPattern=2*i+1===this._patterns.length},t.prototype.throwInvalidFormat=function(t){throw new Error("Invalid date format: "+t)},t.prototype.throwInvalidValue=function(t){throw new Error("Invalid date format: "+t)},t.prototype.getPattern=function(t,e,i){for(var o=1;++e<t.length&&t.charAt(e)==i;)o++;return o},t.prototype.getStrPattern=function(t){for(var e=t.length,i=0,o=0,r=[];e>i;){var n=t[i];if(/-|\.|\/|:| /.test(n))if(r.push(t.substr(o,i-o)),r.push(n),Ot.isWhiteSpace(n)){for(;Ot.isWhiteSpace(t[++i])&&e>i;);o=i}else o=i+1;i++}return r.push(t.substr(o,i-o)),r},t.DATE_SEPARATORS="./-: ",t}(),Tt=function(){function t(t){this._format="",this._type=0,this._parser=new Dt(null),this.format=t}return t.initialize=function(){t.Default.amText="AM",t.Default.pmText="PM",t.Default.baseYear=2e3},t.getReader=function(e){var i=t.Formatters[e];return i||(t.Formatters[e]=i=new t(e)),i},t.getSimpleDateNull=function(t){if(t instanceof Date)return t;if("number"==typeof t)return new Date(t);if("string"!=typeof t)return null;var e=(t=8===t.length&&/^[0-9]*$/.test(t)?t.replace(/(\d{4})(\d{2})(\d{2})/,"$1/$2/$3"):t).split(/[.//-]/);if(3!=e.length)return null;var i=parseInt(e[0]),o=parseInt(e[1])-1,r=parseInt(e[2]);return i==(t=new Date(i,o,r)).getFullYear()&&o==t.getMonth()&&r==t.getDate()?t:null},Object.defineProperty(t.prototype,"format",{get:function(){return this._format},set:function(t){t!=this._format&&(this._format=t,this.parse(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"amText",{get:function(){return this._parser.amText},set:function(t){this._parser.amText=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pmText",{get:function(){return this._parser.pmText},set:function(t){this._parser.pmText=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseYear",{get:function(){return this._parser.baseYear},set:function(t){this._parser.baseYear=t},enumerable:!1,configurable:!0}),t.prototype.toDate=function(t,e){if(!t)return null;var i=null;switch(this._type){case 0:i=this._parser.parse(t,e);break;case 2:var o=parseInt(t);i=new Date(o);break;default:i=new Date(t)}return i&&!isNaN(i.getTime())?i:null},t.prototype.parse=function(e){if(e){if(e.indexOf("T")>0||e.indexOf("Z")>0||/([+\-])(\d\d)?(:)?(\d\d)?$/.test(e))this._type=t.Formats.indexOf("iso");else{var i=e.toLowerCase();this._type=Math.max(0,t.Formats.indexOf(i))}0==this._type&&(this._parser.format=e)}},t.Formats=["custom","iso","timestamp","platform"],t.Default=new t("yyyy/MM/dd HH:mm:ss"),t.Formatters={},t}();Tt.initialize();var Mt=0,Ft=function(){function t(t){this.$_disposed=!1,t||(this.$_hash=Mt++)}return t.prototype.dispose=function(){return this.$_disposed||this.$_disposing||(this.$_disposed=!0,this.$_disposing=!0,this._doDispose()),null},t.prototype._doDispose=function(){},Object.defineProperty(t.prototype,"disposing",{get:function(){return this.$_disposing},enumerable:!1,configurable:!0}),t.prototype.isMe=function(t){return t==this.$_hash},t.prototype.$_getters=function(t){for(var e=[],i=Object.getOwnPropertyNames(t),o=0,r=i.length;o<r;o++){var n=i[o],s=Object.getOwnPropertyDescriptor(t,n);s&&s.get&&e.push(n)}return e},t.prototype.doAssignSimple=function(t){return!1},t.prototype.assignFrom=function(e){var i=Object.getPrototypeOf(this);if(e instanceof t)for(var o=Object.getPrototypeOf(e),r={};o&&o.constructor!=t;){for(var n=this.$_getters(o),s=0,a=n.length;s<a;s++){if(!((c=n[s])in r))if(r[c]=null,d=Object.getOwnPropertyDescriptor(i,c)){if(d.set)(u=Object.getOwnPropertyDescriptor(o,c).get)&&d.set.call(this,u.call(e))}else for(var l=Object.getPrototypeOf(i);l;){var h=Object.getOwnPropertyDescriptor(l,c);if(h){var u;if(h.set)(u=Object.getOwnPropertyDescriptor(o,c).get)&&h.set.call(this,u.call(e));l=null}else l=Object.getPrototypeOf(l)}}o=Object.getPrototypeOf(o)}else if(!this.doAssignSimple(e))for(var c in e){var d;if(d=Object.getOwnPropertyDescriptor(i,c))d.set&&d.set.call(this,e[c]);else for(l=Object.getPrototypeOf(i);l;){var p=Object.getOwnPropertyDescriptor(l,c);p?(p.set&&p.set.call(this,e[c]),l=null):l=Object.getPrototypeOf(l)}}},t.prototype.extend=function(t){for(var e in t)this.hasOwnProperty(e)&&(this[e]=t[e])},t.prototype.toProxy=function(e){void 0===e&&(e=!0);for(var i={},o=Object.getPrototypeOf(this),r=[];o&&o.constructor!=t;){for(var n=this.$_getters(o),s=0,a=n.length;s<a;s++){var l=n[s],h=Object.getOwnPropertyDescriptor(o,l);if(h){if(h.get&&h.set&&r.indexOf(l)<0){r.push(l);var u=h.get.call(this);(e||void 0!==u)&&(null!==u&&"object"==typeof u&&Object.getPrototypeOf(u).hasOwnProperty("toProxy")?i[l]=u.toProxy():i[l]=u)}}else for(var c=Object.getPrototypeOf(o);c;){var d=Object.getOwnPropertyDescriptor(c,l);if(d){if(d.get&&d.set&&r.indexOf(l)<0){r.push(l);u=d.get.call(this);(e||void 0!==u)&&(i[l]=u)}c=null}else c=Object.getPrototypeOf(c)}}o=Object.getPrototypeOf(o)}return i},t}(),Lt=function(t){function e(e,i){var o=t.call(this,e)||this;return o.message=e,o.tokenPos=i,o}return i(e,t),e}(Error),Nt=function(t){function e(e){var i=t.call(this,e)||this;return i.message=e,i}return i(e,t),e}(Error),$t=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=[],o=0,r=t;o<r.length;o++){var n=r[o];i[n]=!0}return i},At=$t(26,27),Bt=$t(40,45,46,47,48,49,50,51,52,53,54,55,56,57,41,42,43,44),Vt=$t(4,5,18,19),jt=$t(11,3,2,14,15,16,17),Ht=function(){function t(){this.IS_IDENT=[],this.IS_INTEGER=[],this.IS_NUMBER=[],this.IS_WHITE=[],this.IS_END=[],this.QUOTATION='"'.charCodeAt(0),this.SQUOTATION="'".charCodeAt(0),this.BACKSLASH="\\".charCodeAt(0),this.Keywords={str:20,num:21,bool:23,not:13,len:24,and:11,in:12,mod:15,or:18,div:14,shl:16,shr:17,xor:19,trim:25,is:26,like:46,ilike:48,match:50,imatch:52,likehan:54,ilikehan:55,defined:35,null:34,empty:36,nan:37,datestr:90,year:91,month:92,day:93,hour:94,rounddown:95,timestamp:96},this._procs=null,this._source=null,this._len=0,this._tokenId=0,this._run=0,this._runAhead=0,this._nextRun=0,this._lineNo=0,this._linePos=0,this._tokenPos=0;for(var t=0;t<256;t++)this.IS_IDENT[t]=t=="_".charCodeAt(0)||t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="a".charCodeAt(0)&&t<="z".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0),this.IS_INTEGER[t]=t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="a".charCodeAt(0)&&t<="f".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="F".charCodeAt(0),this.IS_NUMBER[t]=t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t==".".charCodeAt(0)||t=="e".charCodeAt(0)||t=="E".charCodeAt(0),this.IS_WHITE[t]=t>=1&&t<=9||11==t||t>=14&&t<=32,this.IS_END[t]=0==t;this.initProcs()}return t.prototype.clear=function(){this._source=null},t.prototype.next=function(){var t=this._source.charCodeAt(this._run);this._tokenPos=this._run,t<256?this._procs[t].call(this):this.identProc()},t.prototype.unkownProc=function(){this._tokenId=0,this._run++},t.prototype.symbolProc=function(){this._tokenId=80,this._run++},t.prototype.commaProc=function(){this._tokenId=32,this._run++},t.prototype.crProc=function(){this._tokenId=33,10==this._source.charCodeAt(this._run+1)?this._run+=2:this._run++,this._lineNo++,this._linePos=this._run},t.prototype.lfProc=function(){this._tokenId=33,this._run++,this._lineNo++,this._linePos=this._run},t.prototype.equalProc=function(){this._tokenId=40,"="==this._source.charAt(++this._run)&&"="==this._source.charAt(++this._run)&&this._run++},t.prototype.notProc=function(){this._tokenId=13,"="==this._source.charAt(++this._run)&&(this._tokenId=45,"="==this._source.charAt(++this._run)&&this._run++)},t.prototype.greaterProc=function(){"="==this._source.charAt(this._run+1)?(this._tokenId=42,this._run+=2):(this._tokenId=41,this._run++)},t.prototype.lowerProc=function(){"="==this._source.charAt(this._run+1)?(this._tokenId=44,this._run+=2):">"==this._source.charAt(this._run+1)?(this._tokenId=45,this._run+=2):(this._tokenId=43,this._run++)},t.prototype.nextIdent=function(){for(var t=this._run;t<this._len&&!this.IS_IDENT[this._source.charCodeAt(t)];)t++;for(var e=t;t<this._len&&this.IS_IDENT[this._source.charCodeAt(t)];)t++;return t>e?(this._nextRun=t,this._source.substr(e,t-e).toLowerCase()):null},t.prototype.identProc=function(){for(var t=this._run;this._run<this._len&&(this.IS_IDENT[this._source.charCodeAt(this._run)]||this._source.charCodeAt(this._run)>255);)this._run++;var e=this._source.substr(t,this._run-t).toLowerCase();if(this.Keywords.hasOwnProperty(e))switch(this._tokenId=this.Keywords[e],this._tokenId){case 13:if(e=this.nextIdent())switch(e){case"like":this._tokenId=47,this._run=this._nextRun;break;case"ilike":this._tokenId=49,this._run=this._nextRun;break;case"match":this._tokenId=51,this._run=this._nextRun;break;case"imatch":this._tokenId=53,this._run=this._nextRun;break;case"likehan":this._tokenId=56,this._run=this._nextRun;break;case"ilikehan":this._tokenId=57,this._run=this._nextRun}break;case 26:"not"==(e=this.nextIdent())&&(this._tokenId=27,this._run=this._nextRun)}else this._tokenId=10},t.prototype.integerProc=function(){for(this._tokenId=64,this._run++;this._run<this._len&&this.IS_INTEGER[this._source.charCodeAt(this._run)];)this._run++},t.prototype.numberProc=function(){for(this._tokenId=64,this._run++;this._run<this._len&&this.IS_NUMBER[this._source.charCodeAt(this._run)];){if("."==this._source.charAt(this._run)){if("."==this._source.charAt(this._run+1))break;this._tokenId=63}this._run++}},t.prototype.minusProc=function(){this._tokenId=4,this._run++},t.prototype.plusProc=function(){this._tokenId=5,this._run++},t.prototype.pointProc=function(){"."==this._source.charAt(this._run+1)?(this._tokenId=68,this._run+=2):(this._tokenId=65,this._run++)},t.prototype.roundOpenProc=function(){this._tokenId=66,this._run++},t.prototype.roundCloseProc=function(){this._tokenId=67,this._run++},t.prototype.slashProc=function(){this._tokenId=2,this._run++},t.prototype.spaceProc=function(){for(this._tokenId=71,this._run++;this._run<this._len&&this.IS_WHITE[this._source.charCodeAt(this._run)];)this._run++},t.prototype.bracketOpenProc=function(){this._tokenId=69,this._run++},t.prototype.bracketCloseProc=function(){this._tokenId=70,this._run++},t.prototype.starProc=function(){this._tokenId=3,this._run++},t.prototype.modProc=function(){this._tokenId=15,this._run++},t.prototype.stringProc=function(){this._tokenId=61;do{var t=this._source.charCodeAt(this._run);if(this.IS_END[t])throw new Lt("Untermintated string",t);t==this.BACKSLASH&&this._run++,this._run++}while(this._run<this._len&&this._source.charCodeAt(this._run)!=this.QUOTATION);this._run++},t.prototype.smallStringProc=function(){this._tokenId=61;do{var t=this._source.charCodeAt(this._run);if(this.IS_END[t])throw new Lt("Untermintated string",t);t==this.BACKSLASH&&this._run++,this._run++}while(this._run<this._len&&this._source.charCodeAt(this._run)!=this.SQUOTATION);this._run++},t.prototype.initProcs=function(){this._procs=[];for(var t=1;t<=255;t++)this._procs[t]=this.symbolProc;for(t=1;t<=32;t++)this._procs[t]=this.spaceProc;this._procs[10]=this.lfProc,this._procs[13]=this.crProc,this._procs["$".charCodeAt(0)]=this.integerProc,this._procs[this.QUOTATION]=this.stringProc,this._procs[this.SQUOTATION]=this.smallStringProc;for(t=0;t<=9;t++)this._procs["0".charCodeAt(0)+t]=this.numberProc;for(t="A".charCodeAt(0);t<="Z".charCodeAt(0);t++)this._procs[t]=this.identProc;for(t="a".charCodeAt(0);t<="z".charCodeAt(0);t++)this._procs[t]=this.identProc;this._procs["_".charCodeAt(0)]=this.identProc,this._procs["(".charCodeAt(0)]=this.roundOpenProc,this._procs[")".charCodeAt(0)]=this.roundCloseProc,this._procs["*".charCodeAt(0)]=this.starProc,this._procs["+".charCodeAt(0)]=this.plusProc,this._procs[",".charCodeAt(0)]=this.commaProc,this._procs["-".charCodeAt(0)]=this.minusProc,this._procs[".".charCodeAt(0)]=this.pointProc,this._procs["/".charCodeAt(0)]=this.slashProc,this._procs["%".charCodeAt(0)]=this.modProc,this._procs["<".charCodeAt(0)]=this.lowerProc,this._procs["=".charCodeAt(0)]=this.equalProc,this._procs[">".charCodeAt(0)]=this.greaterProc,this._procs["[".charCodeAt(0)]=this.bracketOpenProc,this._procs["]".charCodeAt(0)]=this.bracketCloseProc,this._procs["!".charCodeAt(0)]=this.notProc},Object.defineProperty(t.prototype,"tokenId",{get:function(){return this._tokenId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tokenLoc",{get:function(){return{x:this._tokenPos-this._linePos,y:this._lineNo}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tokenLen",{get:function(){return this._run-this._tokenPos},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"token",{get:function(){return this._source.substr(this._tokenPos,this.tokenLen)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSpace",{get:function(){return 71==this._tokenId},enumerable:!1,configurable:!0}),t.prototype.init=function(t){this._source=t,this._len=t.length,this._lineNo=0,this._linePos=0,this._tokenPos=0,this._runAhead=this._run=0,this._tokenId=0},t.prototype.charAhread=function(){for(this._runAhead=this._run;this._runAhead<this._len&&this._source.charCodeAt(this._runAhead)>0&&this._source.charCodeAt(this._runAhead)<=32;)this._runAhead++;return this._source.charCodeAt(this._runAhead)},t.prototype.nextId=function(t){do{this.next()}while(this._run<this._len&&this._tokenId!=t);return null},t.prototype.nextNoSpace=function(){if(this._run<this._len)do{this.next()}while(this._run<this._len&&this.isSpace);return null},t.prototype.isFirstInLine=function(){if(0==this._tokenPos)return!0;var t,e=this._tokenPos;for(e--;e>0&&this.IS_WHITE[this._source.charCodeAt(e)];)e--;return 0==e||(10==(t=this._source.charCodeAt(e))||13==t)},t}(),Wt=function(t){function e(){return t.call(this)||this}return i(e,t),e.prototype.isIdentifier=function(t){throw new Error("Token is not a valid Identifier: "+t)},e.prototype.evaluateIdentifier=function(t){throw new Error("Invalid identifier key: "+t)},e.prototype.evaluateIndexerI=function(t,e){throw new Error("Invalid identifier indexer: "+t)},e.prototype.evaluateIndexerS=function(t,e,i){throw new Error("Invalid identifier indexer: "+t)},e}(Ft),Gt=function(){function t(){}return Object.defineProperty(t.prototype,"value",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"asLiteral",{get:function(){return null},enumerable:!1,configurable:!0}),t.prototype.prepareValue=function(){},t.prototype.getLiteral=function(){},t.prototype.isIdentifier=function(t){return!1},t.prototype.toString=function(){return String(this)},t}(),Ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(Gt);!function(t){function e(){return t.call(this)||this}i(e,t),e.prototype.evaluate=function(t){},e.prototype.toString=function(){return""},e.Default=new e}(Gt);var Yt,zt=function(t){function e(){var e=t.call(this)||this;return e._operator=0,e}return i(e,t),e.prototype.evaluate=function(t){if(this._literal)return this._literal.value;if(!this._rightExpr)return this._leftExpr.evaluate(t);var e=this._leftExpr.evaluate(t),i=this._rightExpr.evaluate(t);switch(this._operator){case 40:return e==i;case 45:return e!=i;case 41:return e>i;case 42:return e>=i;case 43:return e<i;case 44:return e<=i;case 46:return this.calcLike(e,i,!1);case 47:return!this.calcLike(e,i,!1);case 48:return this.calcLike(e,i,!0);case 49:return!this.calcLike(e,i,!0);case 54:return this.calcLikeHan(e,i,!1);case 56:return!this.calcLikeHan(e,i,!1);case 55:return this.calcLikeHan(e,i,!0);case 57:return!this.calcLikeHan(e,i,!0);case 50:return this.calcMatch(e,i,!1);case 51:return!this.calcMatch(e,i,!1);case 52:return this.calcMatch(e,i,!0);case 53:return!this.calcMatch(e,i,!0);default:throw new Nt("Unknown operator: "+this._operator)}},e.prototype.toString=function(){var t="";if(this._literal)t=this._literal.toString();else if(this._rightExpr){var e=this._leftExpr.toString(),i=this._rightExpr.toString(),o=void 0;switch(this._operator){case 40:o="=";break;case 45:o="<>";break;case 41:o=">";break;case 42:o=">=";break;case 43:o="<";break;case 44:o="<=";break;case 46:o="like";break;case 47:o="not like";break;case 48:o="ilike";break;case 49:o="not ilike";break;case 50:o="match";break;case 51:o="not match";break;case 52:o="imatch";break;case 53:o="not imatch";break;case 54:o="likeHan";break;case 56:o="not likehan";break;case 55:o="ilikeHan";break;case 57:o="not ilikehan";break;case 32:o=",";break;default:o="<<ERROR>>"}t="("+e+" "+o+" "+i+")"}else t=this._leftExpr.toString();return t},e.prototype.isIdentifier=function(t){return this._leftExpr&&!this._rightExpr&&this._leftExpr.isIdentifier(t)},e.prototype.prepareValue=function(){this._leftExpr.prepareValue(),null==this._rightExpr?this._literal=this._leftExpr.getLiteral():this._rightExpr.prepareValue()},e.prototype.getLiteral=function(){return this._literal},e.prototype.calcLike=function(t,e,i){var o=String(t),r=String(e);if(o&&r){i&&(o=o.toLowerCase(),r=r.toLowerCase());var n=r.length;if(n>1){var s="%"==r.charAt(0),a="%"==r.charAt(n-1);if(s&&a)return r=r.substr(1,n-2),o.indexOf(r,0)>=0;if(s){r=r.substr(1,n-1);var l=o.lastIndexOf(r);return l>=0&&l==o.length-r.length}return a?(r=r.substr(0,n-1),0==o.indexOf(r,0)):o==r}return"%"!=r&&o==r}return!1},e.prototype.calcLikeHan=function(t,e,i){if(t&&e){t=String(t);var o=(e=String(e)).length,r="%"==e.charAt(0),n="%"==e.charAt(o-1);if(e=r&&n?e.substr(1,o-2):r?e.substr(1,o-1):n?e.substr(0,o-1):e,t.length<e.length)return;i&&(t=t.toLowerCase(),e=e.toLowerCase());var s=Ot.hangulToChosungAll(t),a=Ot.hangulToChosungAll(e),l=-1,h=void 0;if(r&&n){for(;(l=s.indexOf(a,l+1))>=0;){for(var u=0;u<a.length&&u+l<s.length;u++){var c=Ot.hangulToChosung(t[u+l]);if((d=Ot.hangulToChosung(e[u])).org&&d.org!==c.org||!d.cho||d.cho!==c.cho){h=!1;break}h=!0}if(h)return!0}return!1}if(r){if((l=s.lastIndexOf(a))>=0&&l===s.length-a.length){for(u=0;u<a.length;u++){c=Ot.hangulToChosung(t[l+u]);if((d=Ot.hangulToChosung(e[u])).org&&d.org!==c.org||!d.cho||d.cho!==c.cho){h=!1;break}h=!0}if(h)return!0}return!1}if(n){if(0===s.indexOf(a)){for(u=0;u<a.length;u++){var d;c=Ot.hangulToChosung(t[u]);if((d=Ot.hangulToChosung(e[u])).org&&d.org!==c.org||!d.cho||d.cho!==c.cho){h=!1;break}h=!0}if(h)return!0}return!1}return t==e}return!1},e.prototype.calcMatch=function(t,e,i){return new RegExp(e,"m"+(i?"i":"")).test(t)},e}(Gt),qt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),Object.defineProperty(e.prototype,"value",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"asLiteral",{get:function(){return this},enumerable:!1,configurable:!0}),e.prototype.evaluate=function(t){},e}(Gt),Kt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toString=function(){return"defined"},e}(qt),Xt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toString=function(){return"empty"},e}(qt),Zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return NaN},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"null"},e}(qt),Jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.toString=function(){return"NaN"},e}(qt),Qt=function(t){function e(i,o,r){var n=t.call(this)||this;return n._leftExpr=i,n._operator=o,n._isNot=27==o,n._value=-1,r instanceof Kt?n._value=e.DEFINED:r instanceof Zt?n._value=e.NULL:r instanceof Xt?n._value=e.EMPTY:r instanceof Jt&&(n._value=e