UNPKG

@lunisolar/plugin-takesound

Version:
3 lines (2 loc) 2.61 kB
"use strict";function e(e,t,n,o){return new(n||(n=Promise))((function(r,u){function a(e){try{l(o.next(e))}catch(e){u(e)}}function i(e){try{l(o.throw(e))}catch(e){u(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(a,i)}l((o=o.apply(e,t||[])).next())}))}function t(e,t){var n,o,r,u,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return u={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function i(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u&&(u=0,i[0]&&(a=0)),a;)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 a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}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:["海中金","爐中火","大林木","路旁土","劍鋒金","山頭火","澗下水","城頭土","白臘金","楊柳木","井泉水","屋上土","霹靂火","松柏木","長流水","砂中金","山下火","平地木","壁上土","金箔金","覆燈火","天河水","大驛土","釵釧金","桑柘木","大溪水","砂中土","天上火","石榴木","大海水"]};exports.takeSound=function(r,u,a){return e(void 0,void 0,void 0,(function(){var e,r;return t(this,(function(t){return a.locale(o,!0),e=u.prototype,r=a.SB.prototype,Object.defineProperty(r,"takeSound",{get:function(){var e=a.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 a.Element5(n[this._takeSoundValue],{lang:this._config.lang})}}),Object.defineProperty(e,"takeSound",{get:function(){return this.char8.day.takeSound}}),[2]}))}))},module.exports=Object.assign(exports?.default??{},exports); //# sourceMappingURL=index.js.map