table.ts 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. /**
  2. * Copyright (c) 2018-2019 Mol* contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author David Sehnal <david.sehnal@gmail.com>
  5. * @author Alexander Rose <alexander.rose@weirdbyte.de>
  6. */
  7. import { MolScriptSymbolTable as MolScript } from '../../language/symbol-table';
  8. import { DefaultQueryRuntimeTable, QuerySymbolRuntime, QueryRuntimeArguments } from './compiler';
  9. import { Queries, StructureProperties, StructureElement, QueryContext } from '../../../mol-model/structure';
  10. import { ElementSymbol, LinkType } from '../../../mol-model/structure/model/types';
  11. import { SetUtils } from '../../../mol-util/set';
  12. import toUpperCase from '../../../mol-util/upper-case';
  13. import { VdwRadius, AtomWeight, AtomNumber } from '../../../mol-model/structure/model/properties/atomic';
  14. import { cantorPairing } from '../../../mol-data/util';
  15. import C = QuerySymbolRuntime.Const
  16. import D = QuerySymbolRuntime.Dynamic
  17. import { bundleElementImpl, bundleGenerator } from '../../../mol-model/structure/query/queries/internal';
  18. const symbols = [
  19. // ============= TYPES =============
  20. C(MolScript.core.type.bool, (ctx, v) => !!v[0](ctx)),
  21. C(MolScript.core.type.num, (ctx, v) => +v[0](ctx)),
  22. C(MolScript.core.type.str, (ctx, v) => '' + v[0](ctx)),
  23. C(MolScript.core.type.list, (ctx, xs) => QueryRuntimeArguments.forEachEval(xs, ctx, (v, i, list) => list[i] = v, [] as any[])),
  24. C(MolScript.core.type.set, (ctx, xs) => QueryRuntimeArguments.forEachEval(xs, ctx, (v, i, set) => set.add(v), new Set<any>())),
  25. C(MolScript.core.type.regex, (ctx, v) => new RegExp(v[0](ctx), (v[1] && v[1](ctx)) || '')),
  26. C(MolScript.core.type.bitflags, (ctx, v) => +v[0](ctx)),
  27. C(MolScript.core.type.compositeKey, (ctx, xs) => QueryRuntimeArguments.forEachEval(xs, ctx, (v, i, list) => list[i] = '' + v, [] as string[]).join('-')),
  28. // ============= LOGIC ================
  29. C(MolScript.core.logic.not, (ctx, v) => !v[0](ctx)),
  30. C(MolScript.core.logic.and, (ctx, xs) => {
  31. if (typeof xs.length === 'number') {
  32. for (let i = 0, _i = xs.length; i < _i; i++) if (!xs[i](ctx)) return false;
  33. } else {
  34. for (const k of Object.keys(xs)) if (!xs[k](ctx)) return false;
  35. }
  36. return true;
  37. }),
  38. C(MolScript.core.logic.or, (ctx, xs) => {
  39. if (typeof xs.length === 'number') {
  40. for (let i = 0, _i = xs.length; i < _i; i++) if (xs[i](ctx)) return true;
  41. } else {
  42. for (const k of Object.keys(xs)) if (xs[k](ctx)) return true;
  43. }
  44. return false;
  45. }),
  46. // ============= RELATIONAL ================
  47. C(MolScript.core.rel.eq, (ctx, v) => v[0](ctx) === v[1](ctx)),
  48. C(MolScript.core.rel.neq, (ctx, v) => v[0](ctx) !== v[1](ctx)),
  49. C(MolScript.core.rel.lt, (ctx, v) => v[0](ctx) < v[1](ctx)),
  50. C(MolScript.core.rel.lte, (ctx, v) => v[0](ctx) <= v[1](ctx)),
  51. C(MolScript.core.rel.gr, (ctx, v) => v[0](ctx) > v[1](ctx)),
  52. C(MolScript.core.rel.gre, (ctx, v) => v[0](ctx) >= v[1](ctx)),
  53. C(MolScript.core.rel.inRange, (ctx, v) => {
  54. const x = v[0](ctx);
  55. return x >= v[1](ctx) && x <= v[2](ctx);
  56. }),
  57. // ============= ARITHMETIC ================
  58. C(MolScript.core.math.add, (ctx, xs) => {
  59. let ret = 0;
  60. if (typeof xs.length === 'number') {
  61. for (let i = 0, _i = xs.length; i < _i; i++) ret += xs[i](ctx);
  62. } else {
  63. for (const k of Object.keys(xs)) ret += xs[k](ctx);
  64. }
  65. return ret;
  66. }),
  67. C(MolScript.core.math.sub, (ctx, xs) => {
  68. let ret = 0;
  69. if (typeof xs.length === 'number') {
  70. if (xs.length === 1) return -xs[0](ctx);
  71. ret = xs[0](ctx) || 0;
  72. for (let i = 1, _i = xs.length; i < _i; i++) ret -= xs[i](ctx);
  73. } else {
  74. const keys = Object.keys(xs);
  75. if (keys.length === 1)
  76. ret = xs[keys[0]](ctx) || 0;
  77. for (let i = 1, _i = keys.length; i < _i; i++) ret -= xs[keys[i]](ctx);
  78. }
  79. return ret;
  80. }),
  81. C(MolScript.core.math.mult, (ctx, xs) => {
  82. let ret = 1;
  83. if (typeof xs.length === 'number') {
  84. for (let i = 0, _i = xs.length; i < _i; i++) ret *= xs[i](ctx);
  85. } else {
  86. for (const k of Object.keys(xs)) ret *= xs[k](ctx);
  87. }
  88. return ret;
  89. }),
  90. C(MolScript.core.math.div, (ctx, v) => v[0](ctx) / v[1](ctx)),
  91. C(MolScript.core.math.pow, (ctx, v) => Math.pow(v[0](ctx), v[1](ctx))),
  92. C(MolScript.core.math.mod, (ctx, v) => v[0](ctx) % v[1](ctx)),
  93. C(MolScript.core.math.min, (ctx, xs) => {
  94. let ret = Number.POSITIVE_INFINITY;
  95. if (typeof xs.length === 'number') {
  96. for (let i = 0, _i = xs.length; i < _i; i++) ret = Math.min(xs[i](ctx), ret);
  97. } else {
  98. for (const k of Object.keys(xs)) ret = Math.min(xs[k](ctx), ret)
  99. }
  100. return ret;
  101. }),
  102. C(MolScript.core.math.max, (ctx, xs) => {
  103. let ret = Number.NEGATIVE_INFINITY;
  104. if (typeof xs.length === 'number') {
  105. for (let i = 0, _i = xs.length; i < _i; i++) ret = Math.max(xs[i](ctx), ret);
  106. } else {
  107. for (const k of Object.keys(xs)) ret = Math.max(xs[k](ctx), ret)
  108. }
  109. return ret;
  110. }),
  111. C(MolScript.core.math.floor, (ctx, v) => Math.floor(v[0](ctx))),
  112. C(MolScript.core.math.ceil, (ctx, v) => Math.ceil(v[0](ctx))),
  113. C(MolScript.core.math.roundInt, (ctx, v) => Math.round(v[0](ctx))),
  114. C(MolScript.core.math.abs, (ctx, v) => Math.abs(v[0](ctx))),
  115. C(MolScript.core.math.sqrt, (ctx, v) => Math.sqrt(v[0](ctx))),
  116. C(MolScript.core.math.cbrt, (ctx, v) => Math.cbrt(v[0](ctx))),
  117. C(MolScript.core.math.sin, (ctx, v) => Math.sin(v[0](ctx))),
  118. C(MolScript.core.math.cos, (ctx, v) => Math.cos(v[0](ctx))),
  119. C(MolScript.core.math.tan, (ctx, v) => Math.tan(v[0](ctx))),
  120. C(MolScript.core.math.asin, (ctx, v) => Math.asin(v[0](ctx))),
  121. C(MolScript.core.math.acos, (ctx, v) => Math.acos(v[0](ctx))),
  122. C(MolScript.core.math.atan, (ctx, v) => Math.atan(v[0](ctx))),
  123. C(MolScript.core.math.sinh, (ctx, v) => Math.sinh(v[0](ctx))),
  124. C(MolScript.core.math.cosh, (ctx, v) => Math.cosh(v[0](ctx))),
  125. C(MolScript.core.math.tanh, (ctx, v) => Math.tanh(v[0](ctx))),
  126. C(MolScript.core.math.exp, (ctx, v) => Math.exp(v[0](ctx))),
  127. C(MolScript.core.math.log, (ctx, v) => Math.log(v[0](ctx))),
  128. C(MolScript.core.math.log10, (ctx, v) => Math.log10(v[0](ctx))),
  129. C(MolScript.core.math.atan2, (ctx, v) => Math.atan2(v[0](ctx), v[1](ctx))),
  130. // ============= STRING ================
  131. C(MolScript.core.str.match, (ctx, v) => v[0](ctx).test(v[1](ctx))),
  132. C(MolScript.core.str.concat, (ctx, xs) => {
  133. let ret: string[] = [];
  134. if (typeof xs.length === 'number') {
  135. for (let i = 0, _i = xs.length; i < _i; i++) ret.push(xs[i](ctx).toString());
  136. } else {
  137. for (const k of Object.keys(xs)) ret.push(xs[k](ctx).toString());
  138. }
  139. return ret.join('');
  140. }),
  141. // ============= LIST ================
  142. C(MolScript.core.list.getAt, (ctx, v) => v[0](ctx)[v[1](ctx)]),
  143. // ============= SET ================
  144. C(MolScript.core.set.has, (ctx, v) => v[0](ctx).has(v[1](ctx))),
  145. C(MolScript.core.set.isSubset, (ctx, v) => SetUtils.isSuperset(v[1](ctx) as Set<any>, v[0](ctx) as Set<any>)),
  146. // ============= FLAGS ================
  147. C(MolScript.core.flags.hasAny, (ctx, v) => {
  148. const test = v[1](ctx);
  149. const tested = v[0](ctx);
  150. if (!test) return !!tested;
  151. return (tested & test) !== 0;
  152. }),
  153. C(MolScript.core.flags.hasAll, (ctx, v) => {
  154. const test = v[1](ctx);
  155. const tested = v[0](ctx);
  156. if (!test) return !tested;
  157. return (tested & test) === test;
  158. }),
  159. ////////////////////////////////////
  160. // Structure
  161. // ============= TYPES ================
  162. C(MolScript.structureQuery.type.elementSymbol, (ctx, v) => ElementSymbol(v[0](ctx))),
  163. C(MolScript.structureQuery.type.atomName, (ctx, v) => toUpperCase(v[0](ctx))),
  164. C(MolScript.structureQuery.type.linkFlags, (ctx, xs) => {
  165. let ret: LinkType = LinkType.Flag.None;
  166. if (typeof xs.length === 'number') {
  167. for (let i = 0, _i = xs.length; i < _i; i++) ret = linkFlag(ret, xs[i](ctx));
  168. } else {
  169. for (const k of Object.keys(xs)) ret = linkFlag(ret, xs[k](ctx));
  170. }
  171. return ret;
  172. }),
  173. // TODO:
  174. // C(MolScript.structureQuery.type.secondaryStructureFlags, (ctx, v) => StructureRuntime.AtomProperties.createSecondaryStructureFlags(env, v)),
  175. // C(MolScript.structureQuery.type.entityType, (ctx, v) => StructureRuntime.Common.entityType(v[0](ctx))),
  176. // C(MolScript.structureQuery.type.ringFingerprint, (ctx, v) => StructureRuntime.Common.ringFingerprint(env, v as any)),
  177. // C(MolScript.structureQuery.type.authResidueId, (ctx, v) => ResidueIdentifier.auth(v[0](ctx), v[1](ctx), v[2] && v[2](ctx))),
  178. // C(MolScript.structureQuery.type.labelResidueId, (ctx, v) => ResidueIdentifier.label(v[0](ctx), v[1](ctx), v[2](ctx), v[3] && v[3](ctx))),
  179. // ============= SLOTS ================
  180. // TODO: slots might not be needed after all: reducer simply pushes/pops current element
  181. C(MolScript.structureQuery.slot.element, (ctx, _) => ctx.element),
  182. // C(MolScript.structureQuery.slot.elementSetReduce, (ctx, _) => ctx.element),
  183. // ============= FILTERS ================
  184. D(MolScript.structureQuery.filter.pick, (ctx, xs) => Queries.filters.pick(xs[0] as any, xs['test'])(ctx)),
  185. D(MolScript.structureQuery.filter.first, (ctx, xs) => Queries.filters.first(xs[0] as any)(ctx)),
  186. D(MolScript.structureQuery.filter.withSameAtomProperties, (ctx, xs) => Queries.filters.withSameAtomProperties(xs[0] as any, xs['source'] as any, xs['property'] as any)(ctx)),
  187. D(MolScript.structureQuery.filter.intersectedBy, (ctx, xs) => Queries.filters.areIntersectedBy(xs[0] as any, xs['by'] as any)(ctx)),
  188. D(MolScript.structureQuery.filter.within, (ctx, xs) => Queries.filters.within({
  189. query: xs[0] as any,
  190. target: xs['target'] as any,
  191. minRadius: xs['min-radius'] as any,
  192. maxRadius: xs['max-radius'] as any,
  193. elementRadius: xs['atom-radius'] as any,
  194. invert: xs['invert'] as any
  195. })(ctx)),
  196. D(MolScript.structureQuery.filter.isConnectedTo, (ctx, xs) => Queries.filters.isConnectedTo({
  197. query: xs[0] as any,
  198. target: xs['target'] as any,
  199. disjunct: xs['disjunct'] as any,
  200. invert: xs['invert'] as any,
  201. linkTest: xs['link-test']
  202. })(ctx)),
  203. // ============= GENERATORS ================
  204. D(MolScript.structureQuery.generator.atomGroups, (ctx, xs) => Queries.generators.atoms({
  205. entityTest: xs['entity-test'],
  206. chainTest: xs['chain-test'],
  207. residueTest: xs['residue-test'],
  208. atomTest: xs['atom-test'],
  209. groupBy: xs['group-by']
  210. })(ctx)),
  211. D(MolScript.structureQuery.generator.all, (ctx) => Queries.generators.all(ctx)),
  212. D(MolScript.structureQuery.generator.empty, (ctx) => Queries.generators.none(ctx)),
  213. // ============= MODIFIERS ================
  214. D(MolScript.structureQuery.modifier.includeSurroundings, (ctx, xs) => Queries.modifiers.includeSurroundings(xs[0] as any, {
  215. radius: xs['radius'](ctx),
  216. wholeResidues: !!(xs['as-whole-residues'] && xs['as-whole-residues'](ctx)),
  217. elementRadius: xs['atom-radius']
  218. })(ctx)),
  219. D(MolScript.structureQuery.modifier.wholeResidues, (ctx, xs) => Queries.modifiers.wholeResidues(xs[0] as any)(ctx)),
  220. D(MolScript.structureQuery.modifier.union, (ctx, xs) => Queries.modifiers.union(xs[0] as any)(ctx)),
  221. D(MolScript.structureQuery.modifier.expandProperty, (ctx, xs) => Queries.modifiers.expandProperty(xs[0] as any, xs['property'])(ctx)),
  222. D(MolScript.structureQuery.modifier.exceptBy, (ctx, xs) => Queries.modifiers.exceptBy(xs[0] as any, xs['by'] as any)(ctx)),
  223. D(MolScript.structureQuery.modifier.includeConnected, (ctx, xs) => Queries.modifiers.includeConnected({
  224. query: xs[0] as any,
  225. linkTest: xs['link-test'],
  226. wholeResidues: !!(xs['as-whole-residues'] && xs['as-whole-residues'](ctx)),
  227. layerCount: (xs['layer-count'] && xs['layer-count'](ctx)) || 1
  228. })(ctx)),
  229. // ============= COMBINATORS ================
  230. D(MolScript.structureQuery.combinator.merge, (ctx, xs) => Queries.combinators.merge(xs as any)(ctx)),
  231. // ============= ATOM PROPERTIES ================
  232. // ~~~ CORE ~~~
  233. D(MolScript.structureQuery.atomProperty.core.elementSymbol, atomProp(StructureProperties.atom.type_symbol)),
  234. D(MolScript.structureQuery.atomProperty.core.vdw, (ctx, _) => VdwRadius(StructureProperties.atom.type_symbol(ctx.element))),
  235. D(MolScript.structureQuery.atomProperty.core.mass, (ctx, _) => AtomWeight(StructureProperties.atom.type_symbol(ctx.element))),
  236. D(MolScript.structureQuery.atomProperty.core.atomicNumber, (ctx, _) => AtomNumber(StructureProperties.atom.type_symbol(ctx.element))),
  237. D(MolScript.structureQuery.atomProperty.core.x, atomProp(StructureProperties.atom.x)),
  238. D(MolScript.structureQuery.atomProperty.core.y, atomProp(StructureProperties.atom.y)),
  239. D(MolScript.structureQuery.atomProperty.core.z, atomProp(StructureProperties.atom.z)),
  240. D(MolScript.structureQuery.atomProperty.core.sourceIndex, atomProp(StructureProperties.atom.sourceIndex)),
  241. D(MolScript.structureQuery.atomProperty.core.operatorName, atomProp(StructureProperties.unit.operator_name)),
  242. D(MolScript.structureQuery.atomProperty.core.modelIndex, atomProp(StructureProperties.unit.model_index)),
  243. D(MolScript.structureQuery.atomProperty.core.modelLabel, atomProp(StructureProperties.unit.model_label)),
  244. D(MolScript.structureQuery.atomProperty.core.atomKey, (ctx, _) => cantorPairing(ctx.element.unit.id, ctx.element.element)),
  245. // TODO:
  246. // D(MolScript.structureQuery.atomProperty.core.bondCount, (ctx, _) => ),
  247. // ~~~ TOPOLOGY ~~~
  248. // TODO
  249. // ~~~ MACROMOLECULAR ~~~
  250. // TODO:
  251. // // identifiers
  252. // labelResidueId: prop((env, v) => ResidueIdentifier.labelOfResidueIndex(env.context.model, getAddress(env, v).residue)),
  253. // authResidueId: prop((env, v) => ResidueIdentifier.authOfResidueIndex(env.context.model, getAddress(env, v).residue)),
  254. // keys
  255. D(MolScript.structureQuery.atomProperty.macromolecular.residueKey, (ctx, _) => StructureElement.residueIndex(ctx.element)),
  256. D(MolScript.structureQuery.atomProperty.macromolecular.chainKey, (ctx, _) => StructureElement.chainIndex(ctx.element)),
  257. D(MolScript.structureQuery.atomProperty.macromolecular.entityKey, (ctx, _) => StructureElement.entityIndex(ctx.element)),
  258. // mmCIF
  259. D(MolScript.structureQuery.atomProperty.macromolecular.id, atomProp(StructureProperties.atom.id)),
  260. D(MolScript.structureQuery.atomProperty.macromolecular.isHet, (ctx, _) => StructureProperties.residue.group_PDB(ctx.element) !== 'ATOM'),
  261. D(MolScript.structureQuery.atomProperty.macromolecular.label_atom_id, atomProp(StructureProperties.atom.label_atom_id)),
  262. D(MolScript.structureQuery.atomProperty.macromolecular.label_alt_id, atomProp(StructureProperties.atom.label_alt_id)),
  263. D(MolScript.structureQuery.atomProperty.macromolecular.label_asym_id, atomProp(StructureProperties.chain.label_asym_id)),
  264. D(MolScript.structureQuery.atomProperty.macromolecular.label_comp_id, atomProp(StructureProperties.residue.label_comp_id)),
  265. D(MolScript.structureQuery.atomProperty.macromolecular.label_seq_id, atomProp(StructureProperties.residue.label_seq_id)),
  266. D(MolScript.structureQuery.atomProperty.macromolecular.label_entity_id, atomProp(StructureProperties.entity.id)),
  267. D(MolScript.structureQuery.atomProperty.macromolecular.auth_atom_id, atomProp(StructureProperties.atom.auth_atom_id)),
  268. D(MolScript.structureQuery.atomProperty.macromolecular.auth_asym_id, atomProp(StructureProperties.chain.auth_asym_id)),
  269. D(MolScript.structureQuery.atomProperty.macromolecular.auth_comp_id, atomProp(StructureProperties.residue.auth_comp_id)),
  270. D(MolScript.structureQuery.atomProperty.macromolecular.auth_seq_id, atomProp(StructureProperties.residue.auth_seq_id)),
  271. D(MolScript.structureQuery.atomProperty.macromolecular.pdbx_PDB_ins_code, atomProp(StructureProperties.residue.pdbx_PDB_ins_code)),
  272. D(MolScript.structureQuery.atomProperty.macromolecular.pdbx_formal_charge, atomProp(StructureProperties.atom.pdbx_formal_charge)),
  273. D(MolScript.structureQuery.atomProperty.macromolecular.occupancy, atomProp(StructureProperties.atom.occupancy)),
  274. D(MolScript.structureQuery.atomProperty.macromolecular.B_iso_or_equiv, atomProp(StructureProperties.atom.B_iso_or_equiv)),
  275. D(MolScript.structureQuery.atomProperty.macromolecular.entityType, atomProp(StructureProperties.entity.type)),
  276. D(MolScript.structureQuery.atomProperty.macromolecular.entitySubtype, atomProp(StructureProperties.entity.subtype)),
  277. D(MolScript.structureQuery.atomProperty.macromolecular.objectPrimitive, atomProp(StructureProperties.unit.object_primitive)),
  278. D(MolScript.structureQuery.atomProperty.macromolecular.isModified, atomProp(StructureProperties.residue.isModified)),
  279. D(MolScript.structureQuery.atomProperty.macromolecular.modifiedParentName, atomProp(StructureProperties.residue.modifiedParentName)),
  280. D(MolScript.structureQuery.atomProperty.macromolecular.isNonStandard, atomProp(StructureProperties.residue.isNonStandard)),
  281. D(MolScript.structureQuery.atomProperty.macromolecular.secondaryStructureKey, atomProp(StructureProperties.residue.secondary_structure_key)),
  282. D(MolScript.structureQuery.atomProperty.macromolecular.secondaryStructureFlags, atomProp(StructureProperties.residue.secondary_structure_type)),
  283. D(MolScript.structureQuery.atomProperty.macromolecular.chemCompType, atomProp(StructureProperties.residue.chem_comp_type)),
  284. // ============= BOND PROPERTIES ================
  285. D(MolScript.structureQuery.linkProperty.order, (ctx, xs) => ctx.atomicLink.order),
  286. D(MolScript.structureQuery.linkProperty.flags, (ctx, xs) => ctx.atomicLink.type),
  287. ////////////////////////////////////
  288. // Internal
  289. D(MolScript.internal.generator.bundleElement, (ctx, xs) => bundleElementImpl(xs.groupedUnits(ctx), xs.ranges(ctx), xs.set(ctx))),
  290. D(MolScript.internal.generator.bundle, (ctx, xs) => bundleGenerator(xs.elements(ctx))),
  291. D(MolScript.internal.generator.current, (ctx, xs) => ctx.tryGetCurrentSelection()),
  292. ];
  293. function atomProp(p: (e: StructureElement.Location) => any): (ctx: QueryContext, _: any) => any {
  294. return (ctx, _) => p(ctx.element);
  295. }
  296. function linkFlag(current: LinkType, f: string): LinkType {
  297. switch (f.toLowerCase()) {
  298. case 'covalent': return current | LinkType.Flag.Covalent;
  299. case 'metallic': return current | LinkType.Flag.MetallicCoordination;
  300. case 'ion': return current | LinkType.Flag.Ionic;
  301. case 'hydrogen': return current | LinkType.Flag.Hydrogen;
  302. case 'sulfide': return current | LinkType.Flag.Sulfide;
  303. case 'aromatic': return current | LinkType.Flag.Aromatic;
  304. case 'computed': return current | LinkType.Flag.Computed;
  305. default: return current;
  306. }
  307. }
  308. (function () {
  309. for (const s of symbols) {
  310. DefaultQueryRuntimeTable.addSymbol(s);
  311. }
  312. })();