text: /**
   * @license
   * Copyright (c) 2014, 2021, Oracle and/or its affiliates.
   * Licensed under The Universal Permissive License (UPL), Version 1.0
   * as shown at https://oss.oracle.com/licenses/upl/
   * @ignore
   */
  define(["exports"],function(e){"use strict";
  /**
     * @license
     * Copyright (c) 2019 2021, Oracle and/or its affiliates.
     * The Universal Permissive License (UPL), Version 1.0
     * as shown at https://oss.oracle.com/licenses/upl/
     * @ignore
     */
  //     JSEP may be freely distributed under the MIT License
  e.ExpParser=function(){function e(e){for(var n=e.expr,r=n.charCodeAt(e.index);32===r||9===r||10===r||13===r;)r=n.charCodeAt(++e.index)}function n(i){var d,x,a=i.expr,o=function(e){var n,i,d,x,a,o,c,u,p;if(o=t(e),!(i=r(e)))return o;for(a={value:i,prec:S(i)},(c=t(e))||O("Expected expression after "+i,e.index),x=[o,a,c];(i=r(e))&&0!==(d=S(i));){for(a={value:i,prec:d},p=i;x.length>2&&d<=x[x.length-2].prec;)c=x.pop(),i=x.pop().value,o=x.pop(),n=j(i,o,c,e),x.push(n);(n=t(e))||O("Expected expression after "+p,e.index),x.push(a,n)}for(u=x.length-1,n=x[u];u>1;)n=j(x[u-1].value,x[u-2],n,e),u-=2;return n}(i);return e(i),a.charCodeAt(i.index)!==A?o:(i.index++,(d=n(i))||O("Expected expression",i.index),e(i),a.charCodeAt(i.index)===C?(i.index++,(x=n(i))||O("Expected expression",i.index),{type:8,test:o,consequent:d,alternate:x}):void O("Expected :",i.index))}function r(n){var r=n.expr;e(n);for(var t=r.substr(n.index,w),i=t.length;i>0;){if(E[t]&&(!q(r.charCodeAt(n.index))||n.index+t.length<r.length&&!F(r.charCodeAt(n.index+t.length))))return n.index+=i,t;t=t.substr(0,--i)}return!1}function t(r){var l,A,b,E=r.expr;if(e(r),M(l=E.charCodeAt(r.index))||l===o)return function(e){for(var n,r,t=e.expr,i="";M(t.charCodeAt(e.index));)i+=t.charAt(e.index++);if(t.charCodeAt(e.index)===o)for(i+=t.charAt(e.index++);M(t.charCodeAt(e.index));)i+=t.charAt(e.index++);if("e"===(n=t.charAt(e.index))||"E"===n){for(i+=t.charAt(e.index++),"+"!==(n=t.charAt(e.index))&&"-"!==n||(i+=t.charAt(e.index++));M(t.charCodeAt(e.index));)i+=t.charAt(e.index++);M(t.charCodeAt(e.index-1))||O("Expected exponent ("+i+t.charAt(e.index)+")",e.index)}return q(r=t.charCodeAt(e.index))?O("Variable names cannot start with a number ("+i+t.charAt(e.index)+")",e.index):r===o&&O("Unexpected period",e.index),{type:3,value:parseFloat(i),raw:i}}(r);if(l===u||l===p||l===s)return a(r);if(l===g)return function(r){var t=r.expr;r.index++;for(var x,a=[],o=0,h=t.length;r.index<h&&!x;){e(r);var f=t.charCodeAt(r.index);if(f===y)x=!0,r.index++;else if(f===c)r.index++,++o!==a.length&&O("Unexpected token ,",r.index);else{var s;s=f===u||f===p?i(r).value:d(r).name,e(r),(f=t.charCodeAt(r.index))!==C&&O("Expected ':'. Found "+String.fromCharCode(f),r.index),r.index++;var l=r.writer;"_ko_property_writers"===s&&(r.writer=1);try{a.push({key:s,value:n(r)})}finally{r.writer=l}}}return x||O("Expected "+String.fromCharCode(y),r.index),{type:10,properties:a}}(r);for(b=(A=E.substr(r.index,k)).length;b>0;){if(A in m&&(!q(E.charCodeAt(r.index))||r.index+A.length<E.length&&!F(E.charCodeAt(r.index+A.length))))return r.index+=b,{type:5,operator:A,argument:t(r),prefix:!0};A=A.substr(0,--b)}var w=r.index,U=r.index+8;return"function"!==E.substring(w,U)||F(E.charCodeAt(U))?!(!q(l)&&l!==h)&&a(r):(r.index=U,function(r){var t=r.expr;e(r);var i=t.charCodeAt(r.index);i!==h&&O("Expected (,",r.index),r.index++;var d=x(r,f,!0);e(r),(i=t.charCodeAt(r.index))!==g&&O("Expected {,",r.index),r.index++,e(r);var a,o=r.index,c=r.index;"return"===t.substring(c,c+6)&&(a=!0,r.index+=6),e(r);var u=n(r);return e(r),(i=t.charCodeAt(r.index))===v&&(r.index++,e(r)),(i=t.charCodeAt(r.index))!==y&&O("Expected },",r.index),r.index++,{type:11,arguments:d,body:u,expr:t.substring(o,r.index-1),return:a}}(r))}function i(e){for(var n,r=e.expr,t="",i=r.charAt(e.index++),d=!1,x=r.length;e.index<x;){if((n=r.charAt(e.index++))===i){d=!0;break}if("\\"===n)switch(n=r.charAt(e.index++)){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=n}else t+=n}return d||O('Unclosed quote after "'+t+'"',e.index),{type:3,value:t,raw:i+t+i}}function d(n){var r,t=n.expr,i=t.charCodeAt(n.index),d=n.index;q(i)?n.index++:O("Unexpected "+t.charAt(n.index),n.index);for(var x=t.length;n.index<x&&F(i=t.charCodeAt(n.index));)n.index++;if("new"===(r=t.slice(d,n.index))){e(n);var o=a(n,4);return 4!==o.type&&O("Expression of type: "+o.type+" not supported for constructor expression"),{type:12,callee:o.callee,arguments:o.arguments}}return U.has(r)?{type:3,value:U.get(r),raw:r}:{type:1,name:r}}function x(r,t,i){for(var x,a,o=r.expr,u=o.length,p=[],h=!1,s=0;r.index<u;){if(e(r),(x=o.charCodeAt(r.index))===t){h=!0,r.index++,t===f&&s&&s>=p.length&&O("Unexpected token "+String.fromCharCode(t),r.index);break}if(x===c){if(r.index++,++s!==p.length)if(t===f)O("Unexpected token ,",r.index);else if(t===l)for(var A=p.length;A<s;A++)p.push(null)}else(!(a=i?d(r):n(r))||p.length>s)&&O("Expected comma",r.index),p.push(a)}return h||O("Expected "+String.fromCharCode(t),r.index),p}function a(r,t){var a,c,v=r.expr;for(c=(a=v.charCodeAt(r.index))===h?function(r){r.index++;var t=n(r);if(e(r),r.expr.charCodeAt(r.index)===f)return r.index++,t;O("Unclosed (",r.index)}(r):a===u||a===p?i(r):a===s?function(e){return e.index++,{type:9,elements:x(e,l)}}(r):d(r),e(r),a=v.charCodeAt(r.index);a===o||a===s||a===h||_(r);){if(r.index++,a===o?(e(r),c={type:2,computed:!1,object:c,property:d(r)}):a===A?(r.index++,e(r),c={type:2,computed:!1,conditional:!0,object:c,property:d(r)}):a===s?(c={type:2,computed:!0,object:c,property:n(r)},e(r),(a=v.charCodeAt(r.index))!==l&&O("Unclosed [",r.index),r.index++):a===h&&(c={type:4,arguments:x(r,f),callee:c}),t===c.type)return c;e(r),a=v.charCodeAt(r.index)}return c}this.parse=function(e){for(var r=e.length,t={index:0,expr:e},i=[];t.index<r;){var d=e.charCodeAt(t.index);if(d===v||d===c)t.index++;else{var x=n(t);x?i.push(x):t.index<r&&O('Unexpected "'+e.charAt(t.index)+'"',t.index)}}return 1===i.length?i[0]:{type:0,body:i}};var o=46,c=44,u=39,p=34,h=40,f=41,s=91,l=93,A=63,v=59,C=58,g=123,y=125;function b(e){return Object.keys(e).reduce(function(e,n){return Math.max(e,n.length)},0)}var m={"-":!0,"!":!0,"~":!0,"+":!0},E={"=":1,"||":2,"&&":3,"|":4,"^":5,"&":6,"==":7,"!=":7,"===":7,"!==":7,"<":8,">":8,"<=":8,">=":8,"<<":9,">>":9,">>>":9,"+":10,"-":10,"*":11,"/":11,"%":11},k=b(m),w=b(E),U=new Map;function S(e){return E[e]||0}function j(e,n,r,t){return"="!==e||t.writer||O("Unexpected operator '='",t.index),{type:"||"===e||"&&"===e?7:6,operator:e,left:n,right:r}}function _(e){var n=e.expr;return n.charCodeAt(e.index)===A&&n.charCodeAt(e.index+1)===o&&!M(n.charCodeAt(e.index+2))}function M(e){return e>=48&&e<=57}function q(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=128&&!E[String.fromCharCode(e)]}function F(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e>=128&&!E[String.fromCharCode(e)]}function O(e,n){var r=new Error(e+" at character "+n);throw r.index=n,r.description=e,r}U.set("true",!0),U.set("false",!1),U.set("null",null),U.set("undefined",void 0)},Object.defineProperty(e,"__esModule",{value:!0})});
  //# sourceMappingURL=ojexpparser.js.map