waku.org/assets/js/755.9a8cac84.js

2 lines
3.2 MiB
JavaScript
Raw Normal View History

2023-07-17 19:49:34 +00:00
/*! For license information please see 755.9a8cac84.js.LICENSE.txt */
(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[755],{82688:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.generateCstDts=void 0;var i=r(62222),a=r(75580),s={includeVisitorInterface:!0,visitorInterfaceName:"ICstNodeVisitor"};t.generateCstDts=function(e,t){var r=n(n({},s),t),o=(0,i.buildModel)(e);return(0,a.genDts)(o,r)}},75580:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.genDts=void 0;var i=n(r(85564)),a=n(r(1469)),s=n(r(35161)),o=n(r(54061)),l=n(r(44908)),c=n(r(11700));function u(e){return"token"===e.kind?"IToken":h(e.name)}function h(e){return(0,c.default)(e)+"CstNode"}function d(e){return(0,c.default)(e)+"CstChildren"}t.genDts=function(e,t){var r,n,c=[];return c=(c=c.concat('import type { CstNode, ICstVisitor, IToken } from "chevrotain";')).concat((0,i.default)((0,s.default)(e,(function(e){return function(e){var t=function(e){var t=h(e.name),r=d(e.name);return"export interface ".concat(t,' extends CstNode {\n name: "').concat(e.name,'";\n children: ').concat(r,";\n}")}(e),r=function(e){var t=d(e.name);return"export type ".concat(t," = {\n ").concat((0,s.default)(e.properties,(function(e){return function(e){var t=function(e){if((0,a.default)(e)){var t=(0,l.default)((0,s.default)(e,(function(e){return u(e)})));return"("+(0,o.default)(t,(function(e,t){return e+" | "+t}))+")"}return u(e)}(e.type);return"".concat(e.name).concat(e.optional?"?":"",": ").concat(t,"[];")}(e)})).join("\n "),"\n};")}(e);return[t,r]}(e)})))),t.includeVisitorInterface&&(c=c.concat((r=t.visitorInterfaceName,n=e,"export interface ".concat(r,"<IN, OUT> extends ICstVisitor<IN, OUT> {\n ").concat((0,s.default)(n,(function(e){return function(e){var t=d(e.name);return"".concat(e.name,"(children: ").concat(t,", param?: IN): OUT;")}(e)})).join("\n "),"\n}")))),c.join("\n\n")+"\n"}},62222:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.buildModel=void 0;var s=r(93062),o=a(r(35161)),l=a(r(85564)),c=a(r(52628)),u=a(r(59704)),h=a(r(7739)),d=a(r(28583));t.buildModel=function(e){var t=new p,r=(0,c.default)(e);return(0,o.default)(r,(function(e){return t.visitRule(e)}))};var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.visitRule=function(e){var t=this.visitEach(e.definition),r=(0,h.default)(t,(function(e){return e.propertyName})),n=(0,o.default)(r,(function(e,t){var r=!(0,u.default)(e,(function(e){return!e.canBeNull})),n=e[0].type;return e.length>1&&(n=(0,o.default)(e,(function(e){return e.type}))),{name:t,type:n,optional:r}}));return{name:e.name,properties:n}},t.prototype.visitAlternative=function(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:!0})},t.prototype.visitOption=function(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:!0})},t.prototype.visitRepetition=function(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:!0})},t.prototype.visitRepetitionMandatory=function(e){return this.visitEach(e.definition)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){return this.visitEach(e.definition).concat({propertyName:e.separator.name,canBeNu