/developtools/hdc/hdc_rust/src/serializer/ |
H A D | unittest.rs | 36 let suc = recv.parse(serialized); in if_session_hand_shake_works() 54 let suc = recv.parse(serialized); in if_session_transfer_payload_works() 83 let suc = recv.parse(serialized); in if_transfer_config_works() 101 let suc = recv.parse(serialized); in if_session_payload_head_works()
|
H A D | serialize.rs | 81 fn parse(&mut self, _: Vec<u8>) -> io::Result<()> { in parse() functions 110 fn parse(&mut self, input: Vec<u8>) -> io::Result<()> { in parse() functions 154 fn parse(&mut self, input: Vec<u8>) -> io::Result<()> { in parse() functions 206 fn parse(&mut self, input: Vec<u8>) -> io::Result<()> { in parse() functions 264 fn parse(&mut self, input: Vec<u8>) -> io::Result<()> { in parse() functions 303 fn parse(&mut self, input: Vec<u8>) -> io::Result<()> { in parse() functions 339 fn parse(&mut self, input: Vec<u8>) -> io::Result<()> { in parse() functions 371 fn parse(&mut self, input: Vec<u8>) -> io::Result<()> { in parse() functions 405 fn parse(&mut self, input: Vec<u8>) -> io::Result<()> { in parse() functions
|
H A D | pack_assemble.rs | 46 payload_head.parse(data)?; in unpack_payload_head() 52 payload_protect.parse(data)?; in unpack_payload_protect()
|
/developtools/ace_js2bundle/ace-loader/src/ |
H A D | manage-bundle-workers.js | 26 let arkEnvParams = JSON.parse(process.env['arkEnvParams']); 35 let splittedData = JSON.parse(arkEnvParams['splittedData']);
|
H A D | resource-plugin.js | 45 const pathInfo = path.parse(input); 95 if (path.parse(parent).name === 'i18n' && path.parse(parent_).name === 'share') { 299 manifest = JSON.parse(jsonString); 320 const pagesConfig = JSON.parse(fs.readFileSync(modulePagePath, 'utf-8')); 348 const pagesConfig = JSON.parse(fs.readFileSync(resourceFile, 'utf-8')); 361 const moduleJson = JSON.parse(fs.readFileSync(process.env.aceModuleJsonPath).toString()); 397 const workerConfig = JSON.parse(fs.readFileSync(process.env.aceBuildJson).toString()); 428 const themeContent = JSON.parse(fs.readFileSync(customThemePath)); 453 return JSON.parse(f [all...] |
H A D | gen-abc.js | 25 const inputPaths = JSON.parse(jsonInput);
|
/developtools/ace_js2bundle/ace-loader/ |
H A D | main.product.js | 54 manifest = JSON.parse(jsonString); 117 const moduleJsonConfig = JSON.parse(fs.readFileSync(process.env.aceModuleJsonPath).toString()); 158 const content = JSON.parse(fs.readFileSync(aceBuildJson)); 173 const workerConfig = JSON.parse(fs.readFileSync(process.env.aceBuildJson).toString()); 201 cssObject = JSON.parse(fs.readFileSync(cssFile)); 214 files = files.concat(JSON.parse(fs.readFileSync(entryFile)));
|
H A D | module-source.js | 49 const pathInfo = path.parse(_src);
|
H A D | copy_deps_source.js | 57 const pathInfo = path.parse(_src); 72 moduleSource.copyResource(path.resolve(__dirname, './third_party/parse5/packages/parse5/dist/cjs'), process.argv[2] + '/parse');
|
/developtools/ace_js2bundle/ace-loader/test/lite/ |
H A D | test.js | 39 const expectedObj = JSON.parse(expectedContent.toString().replace(matchHashComment, '')); 50 const actualObj = JSON.parse(actualString);
|
/developtools/ace_js2bundle/ace-loader/test/card/ |
H A D | test.js | 32 return JSON.parse(fileString); 41 const expectedObj = JSON.parse(expectedContent.toString());
|
/developtools/ace_js2bundle/ace-loader/test/rich/ |
H A D | test.js | 36 const expectedObj = JSON.parse(expectedContent.toString().replace(matchHashComment, '')); 61 expect(JSON.parse(stringifyActual(components))).eql(expectJSON);
|
/developtools/smartperf_host/trace_streamer/src/metrics/ |
H A D | metrics.cpp | 62 json jMessage = json::parse(result); in InitMemoryStrategy() 81 json jMessage = json::parse(result); in InitMemoryUnAggStrategy() 121 json jMessage = json::parse(result); in InitMemoryTaskNameStrategy() 143 json jMessage = json::parse(result); in InitTraceStatsStrategy() 160 json jMessage = json::parse(result); in InitTraceMetaDataStrategy() 173 json jMessage = json::parse(result); in InitSysCallStrategy()
|
/developtools/ace_js2bundle/ace-loader/plugin/templater/ |
H A D | index.js | 17 const parse5 = require('../parse/index') 30 function parse(source, operate, filePath) { 32 process.env.aceModuleRoot || process.cwd(), filePath)).replace(path.parse(filePath).ext, ''); 129 * Recursively parse every node. 297 module.exports = { parse: parse }
|
/developtools/smartperf_host/trace_streamer/src/parser/ptreader_parser/hisysevent_parser/ |
H A D | ptreader_hisysevent_parser.cpp | 34 jMessage = json::parse(buffer); in ParseHiSysEventDataItem()
|
/developtools/ace_js2bundle/ace-loader/src/lite/ |
H A D | lite-transform-style.js | 86 styleValue[styleKey] = JSON.parse(styleValue[styleKey]); 107 style = JSON.parse(style);
|
/developtools/profiler/tools/smaps_show/src/ |
H A D | main.rs | 53 opts.optopt("p", "pid", "parse target pid smaps", "PID"); in main() 57 let matches = match opts.parse(&args[1..]) { in main() 72 Some(s) => s.parse().unwrap_or(-1), in main() 262 let value = cap.get(2).unwrap().as_str().parse().unwrap(); in read_smaps()
|
/developtools/ace_ets2bundle/compiler/ |
H A D | main.js | 153 manifest = JSON.parse(jsonString); 208 const moduleConfigJson = JSON.parse(fs.readFileSync(aceConfigPath).toString()); 255 JSON : JSON5).parse(fs.readFileSync(rootPackageJsonPath, 'utf-8')); 342 const pagesConfig = JSON.parse(fs.readFileSync(modulePagePath, 'utf-8')); 381 const moduleJson = JSON.parse(fs.readFileSync(projectConfig.aceModuleJsonPath).toString()); 524 const cardConfig = JSON.parse(fs.readFileSync(modulePagePath, 'utf-8')); 584 aceBuildJson = JSON.parse(fs.readFileSync(projectConfig.aceBuildJson).toString()); 744 const sdkConfig = JSON.parse(fs.readFileSync(sdkConfigPath, 'utf-8')); 842 const buildJsonInfo = JSON.parse(fs.readFileSync(projectConfig.aceBuildJson).toString());
|
/developtools/ace_js2bundle/ace-loader/plugin/codegen/ |
H A D | index.js | 1 (()=>{"use strict";var e={904:(e,t)=>{var n;let o;Object.defineProperty(t,"__esModule",{value:!0}),t.setDomain=t.getDomain=t.Domain=void 0,function(e){e[e.FA=0]="FA",e[e.FORM=1]="FORM",e[e.ETS=2]="ETS"}(n||(n={})),t.Domain=n,t.setDomain=e=>{o=e},t.getDomain=()=>null!=o?o:n.FA},784:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.errorMap=void 0,t.errorMap=new Map([["fileError","Visual file is damaged"],["versionError","Version number of visual file does not match"],["modelError","Visual model in visual file is damaged"],["codegenError","Codegen hml and css failed"]])},117:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ASTNode=void 0,t.ASTNode=class{accept(e){return e.visit(this)}}},862:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Cache=void 0,t.Cache=class{constructor(e,t=0){this.value="",this.indent=t,this.flag=!0,this.INDENT=e}indentOn(){this.flag=!0}indentOff(){this.flag=!1}incIndent(){this.indent++}decIndent(){this.indent--}checkIndent(){return this.indent<0}getIndents(){if(this.flag){let e="";for(let t=0;t<this.indent;t++)e+=this.INDENT;return e}return""}concat(...e){return this.value+=this.getIndents(),this.value=this.value.concat(...e),String(this.value)}toString(){return this.value}}},243:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Style=t.Tag=void 0;const o=n(117);class r extends o.ASTNode{constructor(e,t,n){super(),this.tagName=e,this.attributes=t,this.content=n}}t.Tag=r;class i extends o.ASTNode{constructor(e,t,n,o){super(),this.mediaQuery=void 0,this.kind=e,this.name=t,this.content=n,this.mediaQuery=o}}t.Style=i},573:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ASTNodeGenerator=void 0;const o=n(243),r=n(334);class i{constructor(e){this.cache=e}visit(e){e instanceof o.Tag?this.genTag(e):e instanceof o.Style&&this.genStyle(e)}static getMethodGen(e){return void 0===i.instance?i.instance=new i(e):i.instance.setCache(e),i.instance}setCache(e){this.cache=e}genTag(e){if(this.cache.concat(r.TokenClass.TAG_START,e.tagName),this.cache.indentOff(),e.attributes.forEach(((e,t)=>{let n="";for(const t of e)n+='"'===t?""":"\n"===t?" ":t;this.cache.concat(r.TokenClass.SPACE,t,r.TokenClass.ASSIGN,r.TokenClass.LQUOTE,n,r.TokenClass.RQUOTE)})),null===e.content)this.cache.concat(r.TokenClass.EMPTY_TAG_END);else{if(this.cache.concat(r.TokenClass.TAG_END),"string"==typeof e.content){let t="";for(const n of e.content)t+="<"===n?"<":n;this.cache.concat(t)}else 0!==e.content.length&&(this.cache.concat(r.TokenClass.NEW_LINE),this.cache.indentOn(),this.cache.incIndent(),e.content.forEach((e=>{e.accept(this),this.cache.indentOff(),this.cache.concat(r.TokenClass.NEW_LINE),this.cache.indentOn()})),this.cache.decIndent(),this.cache.indentOn());this.cache.concat(r.TokenClass.END_TAG_START,e.tagName,r.TokenClass.TAG_END)}}genStyle(e){void 0!==e.mediaQuery&&(this.cache.concat("@media"),this.cache.indentOff(),this.cache.concat(r.TokenClass.SPACE,e.mediaQuery,r.TokenClass.SPACE,r.TokenClass.LBRA,r.TokenClass.NEW_LINE),this.cache.indentOn(),this.cache.incIndent()),"IDStyle"===e.kind&&(this.cache.concat(r.TokenClass.ID_STYLE_START),this.cache.indentOff()),this.cache.concat(e.name,r.TokenClass.SPACE,r.TokenClass.LBRA,r.TokenClass.NEW_LINE),this.cache.indentOn(),this.cache.incIndent(),e.content.forEach(((e,t)=>{this.cache.concat(t,r.TokenClass.COLON,r.TokenClass.SPACE,e,r.TokenClass.SEMICOLON,r.TokenClass.NEW_LINE)})),this.cache.decIndent(),this.cache.concat(r.TokenClass.RBRA,r.TokenClass.NEW_LINE),void 0!==e.mediaQuery&&(this.cache.decIndent(),this.cache.concat(r.TokenClass.RBRA,r.TokenClass.NEW_LINE)),this.cache.concat(r.TokenClass.NEW_LINE)}}t.ASTNodeGenerator=i,i.instance=void 0},844:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CSSBridge=t.HMLBridge=void 0;const o=n(243),r=n(571);t.HMLBridge=class{constructor(){this.errors=0}error(e){console.error("Code generating error: "+e),this.errors+=1}getErrorCount(){return this.errors}visit(e){const t=new Map([["id",e.id]]);let n="";for(let[o,i]of e.property)(0,r.isAttribute)(o,e.type)?("string"!=typeof i&&(i=JSON.stringify(i)),t.set(o,i)):(0,r.isContent)(o)&&(n=i);if(e.children.length>0){n=[];for(const t of e.children)n.push(t.accept(this))}const i=new o.Tag(e.type,t,n);return"wrapper"===t.get("id")?new o.Tag("div",new Map,[i]):i}},t.CSSBridge=class{constructor(){this.errors=0,this.styles=[]}error(e){console.error("Code generating error: "+e),this.errors+=1}getErrorCount(){return this.errors}genIDStyle(e){var t;const n=t=>{const n=new Map;for(const[o,i]of t)(0,r.isStyle)(o,e.type)&&n.set(o,i);return n},i=n(e.property);i.size>0&&this.styles.push(new o.Style("IDStyle",e.id,i)),(null!==(t=e.mediaProperty)&&void 0!==t?t:new Map).forEach(((t,r)=>{const i=n(t);i.size>0&&this.styles.push(new o.Style("IDStyle",e.id,i,r))}));for(const t of e.children)t.accept(this)}visit(e){return this.genIDStyle(e),this.styles}}},55:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.genFACSS=t.genFAHML=void 0;const o=n(573),r=n(862);t.genFAHML=function(e){const t=o.ASTNodeGenerator.getMethodGen(new r.Cache(" "));return e.accept(t),t.cache.toString()},t.genFACSS=function(e){const t=o.ASTNodeGenerator.getMethodGen(new r.Cache(" "));return e.forEach((e=>{e.accept(t)})),t.cache.toString()}},571:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isEvent=t.isData=t.isUnknown=t.isContent=t.isAttribute=t.isStyle=t.styleMap=void 0;const n=["width","height","min-width","min-height","max-width","max-height","padding","padding-start","padding-end","padding-top","padding-right","padding-bottom","padding-left","margin","margin-start","margin-end","margin-top","margin-right","margin-bottom","margin-left","border-width","border-style","border-color","border-radius","border-top-width","border-top-style","border-top-color","border-top-left-radius","border-right-width","border-right-style","border-right-color","border-top-right-radius","border-bottom-width","border-bottom-style","border-bottom-color","border-bottom-right-radius","border-left-width","border-left-style","border-left-color","border-bottom-left-radius","background-color","background","background-image","background-size","background-position","background-repeat","display","opacity","visibility","flex","flex-grow","flex-shrink","flex-basis","position","display","top","right","bottom","left","display-index","flex-weight","aspect-ratio"],o=["font-size","font-family","font-style","font-weight"],r=["text-align","line-height","text-decoration","letter-spacing","max-lines","text-overflow","allow-scale","min-font-size","max-font-size","font-size-step","prefer-font-sizes","color",...o],i=["allow-scale","text-decoration","color",...o],a=["text-color","allow-scale","icon-width","icon-height","radius",...o],s=["texton-color","textoff-color","text-padding","allow-scale",...o],c=["column-height","text-color","allow-scale","letter-spacing","text-decoration","line-height","opacity",...o],l=["text-color","allow-scale","letter-spacing",...o];t.styleMap=new Map([["common",new Set([...n])],["div",new Set(["flex-direction","overflow","flex-wrap","justify-content","align-items","align-content","grid-template-columns","grid-template-rows","grid-row-start","grid-row-end","grid-column-start","grid-column-end","grid-gap","grid-columns-gap","grid-rows-gap"])],["text",new Set([...r])],["image",new Set(["object-fit","match-text-direction","fit-original-size"])],["span",new Set([...i])],["input",new Set(["font-size","font-family","font-weight","color","placeholder-color","allow-scale"])],["button",new Set([...a])],["switch",new Set([...s])],["refresh",new Set(["progress-color"])],["divider",new Set(["stroke-width","line-cap","color"])],["chart",new Set(["stroke-width","radius","start-angle","total-angle","center-x","center-y","colors","weights"])],["picker",new Set([...c])],["picker-view",new Set(["color","font-size","selected-color","selected-font-size","focus-color","focus-font-size","disappear-color","disappear-font-size","font-family"])],["slider",new Set(["color","selected-color","block-color"])],["swiper",new Set(["indicator-color","indicator-selected-color","indicator-size","indicator-top","indicator-right","indicator-bottom","indicator-left"])],["list",new Set(["flex-direction","columns","item-extent","fade-color"])],["list-item",new Set(["column-span"])],["progress",new Set(["color","stroke-width","background-color","secondary-color","scale-width","scale-number","start-angle","total-angle","center-x","center-y","radius"])],["select",new Set(["font-family"])],["menu",new Set([...l])],["option",new Set(["color","font-family","allow-scale","font-size","font-weight","text-decoration"])],["video",new Set(["object-fit"])],["clock",new Set(["font-family"])]]);const d=new Map([["common",new Set(["id","ref","disabled","focusable","data","if","for"])],["image",new Set(["src","alt"])],["button",new Set(["type","value","icon","waiting"])],["refresh",new Set(["offset","refreshing","type","lasttime","friction"])],["input",new Set(["type","checked","name","value","placeholder","maxlength","enterkeytype","headericon"])],["switch",new Set(["checked","showtext","texton","textoff"])],["option",new Set(["value","selected","icon"])],["chart",new Set(["type","percent","datasets","options"])],["picker",new Set(["type","range","selected","start","end","lunar","lunarSwitch","columns","hours","containSecond","value","vibrate"])],["picker-view",new Set(["type","range","selected","start","end","lunar","lunarSwitch","columns","hours","containSecond","indicatorprefix","indicatorsuffix","vibrate"])],["slider",new Set(["min","max","step","showtips","showsteps","mode","value"])],["divider",new Set(["vertical"])],["list",new Set(["scrollpage","cachedcount","scrollbar","scrolleffect","shapemode","indexer","itemscale","itemcenter","updateeffect","scrollvibrate","initialindex","initialoffset"])],["list-item",new Set(["type","primary","section","sticky","stickyradius","clickeffect"])],["swiper",new Set(["index","autoplay","interval","indicator","digital","indicatordisabled","loop","duration","vertical"])],["progress",new Set(["type","percent","secondarypercent","clockwise"])],["menu",new Set(["target","title","type"])],["clock",new Set(["clockconfig","showdigit","hourswest"])],["badge",new Set(["placement","count","visible","maxcount","config","label"])],["video",new Set(["muted","src","autoplay","poster","controls","loop","starttime","direction","speed"])],["tabs",new Set(["index","vertical"])],["tab-bar",new Set(["mode"])],["tab-content",new Set(["scrollable"])]]),p=new Map([["common",new Set(["ontouchstart","ontouchmove","ontouchcancel","ontouchend","onclick","onlongpress","onfocus","onblur","onkey","onswipe"])],["image",new Set(["oncomplete","onerror"])],["input",new Set(["onchange","onenterkeyclick"])],["select",new Set(["onchange"])],["refresh",new Set(["onrefresh","onpulldown"])],["swiper",new Set(["onchange","onrotation"])],["list",new Set(["onindexerchange","onscroll","onscrollbottom","onscrolltop","onscrollend","onscrolltouchup","onrequestitem"])],["list-item",new Set(["onsticky"])],["menu",new Set(["onselected","oncancel"])],["picker",new Set(["oncolumnchange","onchange","oncancel"])],["picker-view",new Set(["oncolumnchange","onchange"])],["video",new Set(["onprepared","onstart","onpause","onfinish","onerror","onseeking","onseeked","ontimeupdate","onfullscreenchange","onstop"])],["tabs",new Set(["onchange"])],["switch",new Set(["onchange"])],["dialog",new Set(["oncancel"])],["slider",new Set(["onchange"])]]);function h(e,t,n){const o=t.get(n);return void 0!==o&&o.has(e)}function u(e,n){return h(e,t.styleMap,"common")||h(e,t.styleMap,n)}function f(e,t){return g(e,t)||m(e,t)}function g(e,t){return h(e,d,"common")||h(e,d,t)}function m(e,t){return h(e,p,"common")||h(e,p,t)}t.isStyle=u,t.isAttribute=f,t.isContent=function(e){return"content"===e},t.isUnknown=function(e,t){return!u(e,t)&&!f(e,t)},t.isData=g,t.isEvent=m},334:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TokenClass=void 0,(n=t.TokenClass||(t.TokenClass={}))[n.IDENTIFIER=0]="IDENTIFIER",n[n.STRING_LITERAL=1]="STRING_LITERAL",n[n.NUMBER=2]="NUMBER",n[n.CHARACTER=3]="CHARACTER",n[n.EOF=4]="EOF",n[n.INVALID=5]="INVALID",n.EMPTY_DATA="empty",n.ASSIGN="=",n.NEW_LINE="\n",n.CARRIAGE_RETURN="\r",n.INDENT=" ",n.SPACE=" ",n.LQUOTE='"',n.RQUOTE='"',n.TAG_START="<",n.TAG_END=">",n.EMPTY_TAG_END="/>",n.END_TAG_START="</",n.ID_STYLE_START="#",n.CLASS_STYLE_START=".",n.LBRA="{",n.RBRA="}",n.SEMICOLON=";",n.COLON=":"},282:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TagTypeMap=void 0,t.TagTypeMap=new Map([["button","TextContent"],["span","TextContent"],["divider","TextContent"],["picker","TextContent"],["option","TextContent"],["clock","TextContent"],["image","Base"],["input","Base"],["chart","Base"],["slider","Base"],["progress","Base"],["text","Text"],["div","Container"],["list","Container"],["list-item","Container"],["list-item-group","Container"],["refresh","Container"],["dialog","Container"],["stack","Container"],["menu","Container"],["select","Container"],["tabs","Container"],["tab-bar","Container"],["tab-content","Container"]])},207:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formManager=void 0;const o=n(891),r=n(945);t.formManager={removeData(e){this.getFormModel().data.delete(e)},addData(e){e instanceof Map?e.forEach(((e,t)=>{this.getFormModel().data.set(t,e)})):Object.keys(e).forEach((t=>{this.getFormModel().data.set(t,e[t])}))},updateAllData(e){this.getFormModel().data.clear(),this.addData(e)},addAction(e,t,n,o,i){const a=new Map;void 0!==n&&Object.keys(n).forEach((e=>{a.set(e,n[e])}));const s=new Map;void 0!==o&&Object.keys(o).forEach((e=>{s.set(e,o[e])})),this.getFormModel().actions.set(e,new r.FormAction(t,a,s,i))},updateAllActions(e){this.getFormModel().actions.clear(),e.forEach(((e,t)=>{const n=void 0===e.params?e.params:this.objectToMap(e.params),o=void 0===e.want?e.want:this.objectToMap(e.want),i=new r.FormAction(e.actionType,n,o);this.getFormModel().actions.set(t,i)}))},removeAction(e){this.getFormModel().actions.delete(e)},addActionParams(e,t){var n,o;const i=null!==(n=this.getFormModel().actions.get(e))&&void 0!==n?n:new r.FormAction(e),a=null!==(o=i.params)&&void 0!==o?o:new Map;Object.keys(t).forEach((e=>{a.set(e,t[e])})),i.params=a},removeActionParam(e,t){var n;const o=this.getFormModel().actions.get(e);null===(n=null==o?void 0:o.params)||void 0===n||n.delete(t)},getFormModel:()=>(0,o.getInstance)().formData,codegenToJson:function(){const e=(0,o.getInstance)().formData,t=this.mapToObject(e.data),n={actions:{},data:{}};return n.data=t,e.actions.forEach(((e,t)=>{n.actions[t]={},n.actions[t].action=e.action,e.params instanceof Map&&e.params.size>0&&(n.actions[t].params=this.mapToObject(e.params)),e.want instanceof Map&&e.want.size>0&&(n.actions[t].abilityName=e.abilityName,n.actions[t].want=this.mapToObject(e.want))})),JSON.stringify(n,null,4)},clear(){(0,o.getInstance)().formData.data.clear(),(0,o.getInstance)().formData.actions.clear()},mapToObject:e=>void 0===e?{}:Array.from(e.entries()).reduce(((e,[t,n])=>Object.assign(Object.assign({},e),{[t]:n})),{}),objectToMap(e){const t=new Map;return Object.keys(e).forEach(((n,o)=>{t.set(n,e[n])})),t}}},945:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FormAction=t.FormModel=void 0,t.FormModel=class{constructor(){this.data=new Map,this.actions=new Map}},t.FormAction=class{constructor(e,t,n,o){this.action=e,this.abilityName=o,this.want=n,this.params=t}}},509:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeForVersion1=t.rootToVisualContent=t.visualToRootContent=t.serializeForVersion1=void 0;const o=n(891),r=n(933),i=n(571),a=n(282),s=n(945),c=n(977),l=new Map;function d(e){l.set("textMap",new Map);const t=p(null!=e?e:(0,o.getInstance)().visualModel);return JSON.stringify({VisualVersion:"1",content:JSON.stringify(t),extraData:JSON.stringify(f(l))})}function p(e){const t=Array.from(e.property).filter((t=>(0,i.isAttribute)(t[0],e.type)));t.push(["id",e.id]);const n=Array.from(e.property).filter((t=>(0,i.isStyle)(t[0],e.type)));let o=a.TagTypeMap.get(e.type);void 0===o&&(o="Base");let r=e.property.has("content")?e.property.get("content"):[];if(e.children.length>0){if("string"==typeof r){const t=l.get("textMap");t instanceof Map&&t.set(e.id,r)}r=e.children.map((e=>p(e)))}return{id:e.id,tagName:e.type,attributes:t,idStyle:n,type:o,content:r}}function h(e,t){let n;if(t instanceof Map){const o=t.get("textMap");o instanceof Map&&(n=o.get(e.id))}const o=new r.VisualModel({id:e.id,type:e.tagName,property:new Map([...e.attributes,...e.idStyle])});return"string"==typeof n&&o.property.set("content",n),o.property.delete("id"),"string"==typeof e.content&&o.property.set("content",e.content),Array.isArray(e.content)&&(o.children=e.content.map((e=>h(e,t)))),o}function u(e){if(e instanceof Array&&e.length>0&&"$$map"===e[0]){e.shift();const t=new Map;for(const[n,o]of e)t.set(n,u(o));return t}return e}function f(e){if(e instanceof Map){const t=["$$map"];for(const[n,o]of e)t.push([n,f(o)]);return t}return e}t.serializeForVersion1=d,t.visualToRootContent=function(e){try{return d(JSON.parse(e,c.reviver).visualModel)}catch(e){console.error("convert visual model to root model failed")}return e},t.rootToVisualContent=function(e){const t=JSON.parse(e),n=JSON.parse(t.content);let o='["$$map",["textMap",["$$map"]]]';"string"==typeof t.extraData&&(o=JSON.parse(t.extraData));const r=h(n,u(o));return r.property.has("flex-direction")||r.property.set("flex-direction","column"),JSON.stringify({document:{VisualVersion:"12",type:"FA"},visualModel:r,formData:new s.FormModel},c.replacer)},t.deserializeForVersion1=function(e){try{const t=JSON.parse(e),n=JSON.parse(t.content);let r='["$$map",["textMap",["$$map"]]]';"string"==typeof t.extraData&&(r=JSON.parse(t.extraData)),(0,o.getInstance)().visualModel=h(n,u(r)),(0,o.getInstance)().visualModel.property.has("flex-direction")||(0,o.getInstance)().visualModel.property.set("flex-direction","column")}catch(e){console.error("convert error")}}},891:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setInstance=t.getInstance=void 0;const o=n(933),r=n(945),i=n(904),a={document:{VisualVersion:"12",type:"FA"},visualModel:new o.VisualModel({type:"div",id:"wrapper"}),formData:new r.FormModel};t.getInstance=function(){return a},t.setInstance=function(e){for(const t in a)Object.prototype.hasOwnProperty.call(e,t)&&(a[t]=e[t]);const t=a.document.type;(0,i.setDomain)("ETS"===t?i.Domain.ETS:"FORM"===t?i.Domain.FORM:i.Domain.FA)}},977:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reviver=t.replacer=t.deserialize=t.serialize=void 0;const o=n(933),r=n(891),i=n(509);function a(e,t){if(t instanceof Map)return{dataType:"Map",value:Object.fromEntries(t.entries())};if(t instanceof Set)return{dataType:"Set",value:Array.from(t.entries())};if(t instanceof o.VisualModel){const e=new o.VisualModel({type:"none"}),n={};for(const o in e)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return{dataType:"VisualModel",value:n}}return t}function s(e,t){if("object"==typeof t&&null!=t){if("Map"===t.dataType)return new Map(Object.entries(t.value));if("Set"===t.dataType)return new Set(t.value);if("VisualModel"===t.dataType){const e=new o.VisualModel({type:""});Object.assign(e,t.value),t=e}}return t}t.serialize=function(e,t){return 1===e?(0,i.serializeForVersion1)(t):JSON.stringify(null!=t?t:(0,r.getInstance)(),a,4)},t.deserialize=function(e){if("1"===JSON.parse(e).VisualVersion)return(0,i.deserializeForVersion1)(e);const t=JSON.parse(e,s);(0,r.setInstance)(t)},t.replacer=a,t.reviver=s},933:(e,t)=>{Object.defineProperty(t,"__esModu (…)
|
/developtools/smartperf_host/trace_streamer/src/parser/pbreader_parser/hisysevent_parser/ |
H A D | pbreader_hisysevent_parser.cpp | 45 // parse hisysevent device state in Parse() 66 jMessage = json::parse(hisyseventLine.raw_content().ToStdString()); in Parse()
|
/developtools/hdc/hdc_rust/src/common/ |
H A D | forward.rs | 519 match array[1].parse::<u32>() { in check_node_info() 875 let Ok(port) = ctx.local_args[1].parse::<u32>() else { 876 crate::error!("setup tcp point parse error"); 1011 true => parameter.parse::<u32>().unwrap_or_else(|e| { in get_pid() 1017 params[0].parse::<u32>().unwrap_or_else(|e| { in get_pid() 1307 crate::error!("argc < 2 parse is failed."); in forward_parse_cmd() 1312 crate::error!("parse's length is flase."); in forward_parse_cmd()
|
/developtools/ace_ets2bundle/compiler/server/ |
H A D | build_pipe_server.js | 119 const jsonData = JSON.parse(message);
163 line: parseInt(JSON.parse(receivedMsg.data.offset).line),
164 column: parseInt(JSON.parse(receivedMsg.data.offset).column),
|
/developtools/hdc/hdc_rust/src/daemon/ |
H A D | main.rs | 57 .parse::<usize>() in get_logger_lv()
|
/developtools/integration_verification/cases/daily/mini_system/ |
H A D | L0_mini_system_test.py | 15 from ast import parse namespace
|
/developtools/packing_tool/ohos_packing_tool/frameworks/src/ |
H A D | packager.cpp | 139 jsonObject = nlohmann::json::parse(i, nullptr, false); in ParseJsonFile()
|