-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathsrc_app_custom-elements_live-example_live-example_module_ts.43b2ba875258be23.js
executable file
·2 lines (2 loc) · 4.39 KB
/
src_app_custom-elements_live-example_live-example_module_ts.43b2ba875258be23.js
1
2
"use strict";(self.webpackChunksite=self.webpackChunksite||[]).push([["src_app_custom-elements_live-example_live-example_module_ts"],{8517:(y,d,l)=>{l.r(d),l.d(d,{LiveExampleModule:()=>m});var c=l(4666),f=l(6403),t=l(2560);function a(s,n){const e="string"==typeof n?n:n.find(i=>s.hasOwnProperty(i.toLowerCase()));return void 0===e?void 0:s[e.toLowerCase()]}function r(s,n=!1){return void 0===s?n:"false"!==s.trim()}const g=["content"];function _(s,n){if(1&s&&(t.TgZ(0,"p"),t._uU(1," \u4f60\u8fd8\u53ef\u4ee5 "),t.TgZ(2,"a",8),t._uU(3,"\u4e0b\u8f7d\u8fd9\u4e2a\u4f8b\u5b50"),t.qZA(),t._uU(4,"\u3002 "),t.qZA()),2&s){const e=t.oxw(2);t.xp6(2),t.Q6J("href",e.zip,t.LSH)}}function b(s,n){if(1&s&&(t.TgZ(0,"span")(1,"div",5),t._UZ(2,"aio-embedded-stackblitz",6),t.qZA(),t.YNc(3,_,5,1,"p",7),t.qZA()),2&s){const e=t.oxw();t.xp6(1),t.s9C("title",e.title),t.xp6(1),t.Q6J("src",e.stackblitz),t.xp6(1),t.Q6J("ngIf",e.enableDownload)}}function w(s,n){if(1&s&&(t.TgZ(0,"span")(1,"a",9),t._uU(2),t.qZA()()),2&s){const e=t.oxw();t.xp6(1),t.s9C("title",e.title),t.Q6J("href",e.zip,t.LSH),t.xp6(1),t.Oqu(e.title)}}function E(s,n){if(1&s&&(t.TgZ(0,"span"),t._uU(1," / "),t.TgZ(2,"a",8),t._uU(3,"\u4e0b\u8f7d\u8303\u4f8b"),t.qZA()()),2&s){const e=t.oxw(2);t.xp6(2),t.Q6J("href",e.zip,t.LSH)}}function C(s,n){if(1&s&&(t.TgZ(0,"span")(1,"a",10),t._uU(2),t.qZA(),t.YNc(3,E,4,1,"span",7),t.qZA()),2&s){const e=t.oxw();t.xp6(1),t.s9C("title",e.title),t.Q6J("href",e.stackblitz,t.LSH),t.xp6(1),t.Oqu(e.title),t.xp6(1),t.Q6J("ngIf",e.enableDownload)}}const v=["*"],Z=["iframe"],z=f.bL+"live-examples/",S=f.bL+"zips/";class p{constructor(n,e){const i=function h(s){const n=s instanceof t.SBq?s.nativeElement.attributes:s.attributes,e={};for(const i of n)e[i.name.toLowerCase()]=i.value;return e}(n),o=this.getExampleDir(i,e.path(!1)),x=this.getStackblitzName(i);this.mode=this.getMode(i),this.enableDownload=this.getEnableDownload(i),this.stackblitz=this.getStackblitz(o,x,"embedded"===this.mode),this.zip=this.getZip(o,x),this.title=this.getTitle(i)}ngAfterContentInit(){const n=this.content.nativeElement.textContent.trim();n&&(this.title=n)}getEnableDownload(n){return!r(a(n,"noDownload"))}getExampleDir(n,e){let i=a(n,"name");if(!i){const o=e.match(/[^/?#]+(?=\/?(?:\?|#|$))/);i=o?o[0]:"index"}return i.trim()}getMode(n){const e=r(a(n,"downloadOnly")),i=r(a(n,"embedded"));return e?"downloadOnly":i?"embedded":"default"}getStackblitz(n,e,i){return`${z}${n}/${e}stackblitz.html${i?"?ctl=1":""}`}getStackblitzName(n){const e=(a(n,"stackblitz")||"").trim();return e&&`${e}.`}getTitle(n){return(a(n,"title")||"\u73b0\u573a\u6f14\u7ec3").trim()}getZip(n,e){const i=n.split("/")[0];return`${S}${n}/${e}${i}.zip`}static#t=this.\u0275fac=function(e){return new(e||p)(t.Y36(t.SBq),t.Y36(c.Ye))};static#e=this.\u0275cmp=t.Xpm({type:p,selectors:[["live-example"]],viewQuery:function(e,i){if(1&e&&t.Gf(g,7),2&e){let o;t.iGM(o=t.CRH())&&(i.content=o.first)}},ngContentSelectors:v,decls:7,vars:3,consts:[[2,"display","none"],["content",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"title"],[3,"src"],[4,"ngIf"],["download","","title","\u4e0b\u8f7d\u8303\u4f8b",3,"href"],["download","",3,"href","title"],["target","_blank",3,"href","title"]],template:function(e,i){1&e&&(t.F$t(),t.TgZ(0,"span",0,1),t.Hsn(2),t.qZA(),t.TgZ(3,"span",2),t.YNc(4,b,4,3,"span",3),t.YNc(5,w,3,3,"span",3),t.YNc(6,C,4,4,"span",4),t.qZA()),2&e&&(t.xp6(3),t.Q6J("ngSwitch",i.mode),t.xp6(1),t.Q6J("ngSwitchCase","embedded"),t.xp6(1),t.Q6J("ngSwitchCase","downloadOnly"))},dependencies:function(){return[c.O5,c.RF,c.n9,c.ED,u]},encapsulation:2})}class u{ngAfterViewInit(){this.iframe&&(this.iframe.nativeElement.src=this.src)}static#t=this.\u0275fac=function(e){return new(e||u)};static#e=this.\u0275cmp=t.Xpm({type:u,selectors:[["aio-embedded-stackblitz"]],viewQuery:function(e,i){if(1&e&&t.Gf(Z,7),2&e){let o;t.iGM(o=t.CRH())&&(i.iframe=o.first)}},inputs:{src:"src"},decls:2,vars:0,consts:[["frameborder","0","width","100%","height","100%"],["iframe",""]],template:function(e,i){1&e&&t._UZ(0,"iframe",0,1)},styles:["iframe[_ngcontent-%COMP%]{min-height:400px}\n/*# sourceMappingURL=live-example.component.ts-angular-inline--2.css.map*/"]})}class m{constructor(){this.customElementComponent=p}static#t=this.\u0275fac=function(e){return new(e||m)};static#e=this.\u0275mod=t.oAB({type:m});static#n=this.\u0275inj=t.cJS({imports:[c.ez]})}}}]);
//# sourceMappingURL=src_app_custom-elements_live-example_live-example_module_ts.43b2ba875258be23.js.map