@lunisolar/plugin-takesound
Version:
lunisolar.js的五行纳音插件
3 lines (2 loc) • 2.54 kB
JavaScript
function e(e,t,n,o){return new(n||(n=Promise))((function(r,a){function u(e){try{l(o.next(e))}catch(e){a(e)}}function i(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,i)}l((o=o.apply(e,t||[])).next())}))}function t(e,t){var n,o,r,a,u={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(u=0)),u;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,o=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(r=u.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){u.label=i[1];break}if(6===i[0]&&u.label<r[1]){u.label=r[1],r=i;break}if(r&&u.label<r[2]){u.label=r[2],u.ops.push(i);break}r[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}var n=[3,1,0,2,3,1,4,2,3,0,4,2,1,0,4,3,1,0,2,3,1,4,2,3,0,4,2,1,0,4],o={name:"zh",takeSound:["海中金","爐中火","大林木","路旁土","劍鋒金","山頭火","澗下水","城頭土","白臘金","楊柳木","井泉水","屋上土","霹靂火","松柏木","長流水","砂中金","山下火","平地木","壁上土","金箔金","覆燈火","天河水","大驛土","釵釧金","桑柘木","大溪水","砂中土","天上火","石榴木","大海水"]},r=function(r,a,u){return e(void 0,void 0,void 0,(function(){var e,r;return t(this,(function(t){return u.locale(o,!0),e=a.prototype,r=u.SB.prototype,Object.defineProperty(r,"takeSound",{get:function(){var e=u.getLocale(this._config.lang);return void 0===this._takeSoundValue&&(this._takeSoundValue=(this.value>>1)%30),e.takeSound[this._takeSoundValue]}}),Object.defineProperty(r,"takeSoundE5",{get:function(){return void 0===this._takeSoundValue&&(this._takeSoundValue=(this.value>>1)%30),new u.Element5(n[this._takeSoundValue],{lang:this._config.lang})}}),Object.defineProperty(e,"takeSound",{get:function(){return this.char8.day.takeSound}}),[2]}))}))};export{r as takeSound};
//# sourceMappingURL=index.mjs.map