(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[14562],{14562:function(y,t,a){"use strict";a.r(t),a.d(t,{modelica:function(){return w}});function r(n){for(var e={},i=n.split(" "),l=0;l+\-\/^\[\]]/,d=/(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/,o=/[0-9]/,k=/[_a-zA-Z]/;function h(n,e){return n.skipToEnd(),e.tokenize=null,"comment"}function b(n,e){for(var i=!1,l;l=n.next();){if(i&&l=="/"){e.tokenize=null;break}i=l=="*"}return"comment"}function g(n,e){for(var i=!1,l;(l=n.next())!=null;){if(l=='"'&&!i){e.tokenize=null,e.sol=!1;break}i=!i&&l=="\\"}return"string"}function v(n,e){for(n.eatWhile(o);n.eat(o)||n.eat(k););var i=n.current();return e.sol&&(i=="package"||i=="model"||i=="when"||i=="connector")?e.level++:e.sol&&i=="end"&&e.level>0&&e.level--,e.tokenize=null,e.sol=!1,u.propertyIsEnumerable(i)?"keyword":c.propertyIsEnumerable(i)?"builtin":f.propertyIsEnumerable(i)?"atom":"variable"}function z(n,e){for(;n.eat(/[^']/););return e.tokenize=null,e.sol=!1,n.eat("'")?"variable":"error"}function m(n,e){return n.eatWhile(o),n.eat(".")&&n.eatWhile(o),(n.eat("e")||n.eat("E"))&&(n.eat("-")||n.eat("+"),n.eatWhile(o)),e.tokenize=null,e.sol=!1,"number"}const w={name:"modelica",startState:function(){return{tokenize:null,level:0,sol:!0}},token:function(n,e){if(e.tokenize!=null)return e.tokenize(n,e);if(n.sol()&&(e.sol=!0),n.eatSpace())return e.tokenize=null,null;var i=n.next();if(i=="/"&&n.eat("/"))e.tokenize=h;else if(i=="/"&&n.eat("*"))e.tokenize=b;else{if(d.test(i+n.peek()))return n.next(),e.tokenize=null,"operator";if(p.test(i))return e.tokenize=null,"operator";if(k.test(i))e.tokenize=v;else if(i=="'"&&n.peek()&&n.peek()!="'")e.tokenize=z;else if(i=='"')e.tokenize=g;else if(o.test(i))e.tokenize=m;else return e.tokenize=null,"error"}return e.tokenize(n,e)},indent:function(n,e,i){if(n.tokenize!=null)return null;var l=n.level;return/(algorithm)/.test(e)&&l--,/(equation)/.test(e)&&l--,/(initial algorithm)/.test(e)&&l--,/(initial equation)/.test(e)&&l--,/(end)/.test(e)&&l--,l>0?i.unit*l:0},languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:s}}}}]);